go-fuse
go-fuse copied to clipboard
Support `Btime` (birth time, creation time) on macOS
While FUSE does not seem to natively support Btime
, osxfuse does. On Darwin currently all files/dirs on a FUSE file system show as "Created on" 1970-01-01
. According to the author of osxfuse the fix could be rather simple:
FUSE for macOS sends FUSE_GETXTIMES messages to your user space file system daemon. You need to reply with the creation time.
If someone points me into the right direction I can try and make a PR.
See also: osxfuse/osxfuse#501 rfjakob/gocryptfs#229
have a look at opcode.go, https://github.com/hanwen/go-fuse/blob/02b38384c28d568e5f9da00924007fd101d56099/fuse/opcode.go
You should define the right opcode, and set up handlers for it. Then you wire this through RawFileSystem (see https://github.com/hanwen/go-fuse/blob/02b38384c28d568e5f9da00924007fd101d56099/fuse/api.go) and from there to nodefs.FileSystem and pathfs.FileSystem.
Thanks for your reply. I tried for a couple of hours but this is beyond my skillset. I don't have the feeling I know what I'm doing which in this case I fear would be of advantage.
Is there any news on the topic. Unfortunately, I don't have the know-how, but I would be totally grateful if that could be fixed