EtiennePerot / fuse-jna

No-nonsense, actually-working Java bindings to FUSE using JNA.
http://fusejna.net/
Other
137 stars 43 forks source link

rename of memoryfs doesn't work #9

Closed richardcypher closed 11 years ago

richardcypher commented 11 years ago

hi, i found the rename of memoryfs doesn't work when i want to rename a file, it can work when i just move it to other places , and when i want to rename a file ,it says no such file, what should i do to make it run correctly? is it a bug or something? thanks a lot

EtiennePerot commented 11 years ago

Thanks, should be fixed in 93ce3c9420c50d3966e3cf1624cbd68b68a84d3e.

(The following rant is based on the assumption that you discovered this because you tried implementing your own filesystem by using MemoryFS as a base; if this assumption is false, please ignore all of what follows. I'm just writing it down here so that it's there somewhere)

Keep in mind that MemoryFS is just an example filesystem to get you started writing your own; you shouldn't use MemoryFS as a starting point, as it isn't modelled after the way Unix filesystems are supposed to work (i.e. with inodes and links and permissions etc). The current implementation of MemoryFS makes a lot of assumptions and doesn't support many features that most filesystems have, such as hard/soft links, owner/group, permissions, extended attributes, etc. It also makes a lot of shortcuts, such as returning a success code on all open() methods, regardless of whether the requested file exists or not.

tl;dr: MemoryFS is meant to be a quick example to get people started and to show that fuse-jna works. It is not not a full-fledged filesystem that you should model yours after. If you do want to write your own in-memory filesystem which does implement all of what a filesystem should do, I'll be happy to merge it in as an example, but it'd be named something else (like AdvancedMemoryFS or something), as it fulfills a different purpose than MemoryFS does.

richardcypher commented 11 years ago

thanks for your reply, and it would be great with a more proper example so i can implement my filesystem better