You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my filesystem, I want to be able to differentiate between operations that take place on different file descriptors, but since the I/O operations only include the path, I don't see a way to do that. Is it possible at all? If not, is it a limitation of FUSE or the python-fuse library? I see in the FUSE struct that there's a an "fh" value that looks like it might be what I need, but I'm not certain.
The text was updated successfully, but these errors were encountered:
Reading a chapter in new_fusepy_api[1] I see two possibilities:
The method YourFuseClass.open(...) returns any object (like a dict, a list, a class instance, ...). Then the other methods (read(...), write(...) get this object as additional fh argument.
Set YourFuseClass.file_class = YourOwnFileClass before calling main(). Then the related I/O methods (read(...), write(...) are called on a separate class instance (of YourOwnFileClass) for each file handle. (And __init__(...) is called instead of open().)
I don't understand how that's supposed to work. python-fuse will still pass in strings to indicate the open file regardless of the underlying class. If you open the same file multiple times, regardless of the underlying IO type, python-fuse will still use the exact same string for all handles.
In my filesystem, I want to be able to differentiate between operations that take place on different file descriptors, but since the I/O operations only include the path, I don't see a way to do that. Is it possible at all? If not, is it a limitation of FUSE or the python-fuse library? I see in the FUSE struct that there's a an "fh" value that looks like it might be what I need, but I'm not certain.
The text was updated successfully, but these errors were encountered: