go-fuse icon indicating copy to clipboard operation
go-fuse copied to clipboard

Support `Btime` (birth time, creation time) on macOS

Open alexanderharm opened this issue 6 years ago • 3 comments

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

alexanderharm avatar May 09 '18 05:05 alexanderharm

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.

hanwen avatar May 09 '18 07:05 hanwen

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.

alexanderharm avatar May 11 '18 11:05 alexanderharm

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

warmup72 avatar Oct 09 '21 07:10 warmup72