SerCeMan / jnr-fuse

FUSE implementation in Java using Java Native Runtime (JNR)
MIT License
365 stars 87 forks source link

Unable to report file creation time #70

Closed msevcenko closed 5 years ago

msevcenko commented 5 years ago

On Windows, when I set the FileStat.st_ctim value in the getattr method, it has no effect. File manager still reports uninitialized creation time, i.e. ‎January 1st, 1970, ‏‎0:00:00 GMT. The FileStat.st_mtim value is correctly reported as modification time. Only for files, Windows do not display modification for directories, as they have no content so that they cannot be modified.

Is this jnr-fuse issue, or is it caused by something else?

It would be also nice to implement these attributes in the MemoryFS example so that it's proven that it works.

msevcenko commented 5 years ago

Looks like I should be using stat.st_birthtime instead of FileStat.st_ctim, on Windows, is that right? The javadoc says st_birthtime is Mac OS specific.

Or is it safe to set both fields, to be platform independent?

msevcenko commented 5 years ago

Ok, looks like a duplicate of https://github.com/SerCeMan/jnr-fuse/pull/51.

The st_ctim is actually a "last status change", not a creation time.

I also have the last release 0.5.1, which is quite old (Oct 2017), which does not have the mentioned pull request yet.

msevcenko commented 5 years ago

Ok, there is 0.5.2.1 on jcenter, 0.5.1 is the latest release on maven central.

SerCeMan commented 5 years ago

Hey, @msevcenko!

Can you please link the ref to jnr-fuse on maven central? jnr-fuse has never been published to maven central, only to jcenter.

msevcenko commented 5 years ago

Hi,

I mean https://mvnrepository.com/artifact/com.github.serceman/jnr-fuse

SerCeMan commented 5 years ago

Hm, it seems to be referencing another repository called Spring Plugins. I've never heard about this repository before, but I assume that jnr-fuse might be included as one of the transitive dependencies.

msevcenko commented 5 years ago

Ok, forget it :) I just use mvnrepository.com to search for plugins and it indexes several repositories, and I just mistaken Spring Plugins for mavenCentral. So now I know where to look for latest releases, thanks.