Mono.Fuse 0.3.0 - Jonathan Pryor's web log
« Miguel's ReflectionFS | Main | Naming, Mono.Fuse Documentation »
Mono.Fuse 0.3.0
Mono.Fuse is a C# binding for FUSE. This is the third major release.
This release completely changes the public API for consistency and performance. Hopefully this will be the last API change, though I would appreciate any feedback on the current Mono.Fuse.FileSystem.OnReadDirectory API.
API Changes from the previous release:
- FileSystem:
- The EnableDebugOutput property has been renamed to EnableFuseDebugOutput. To get FileSystem trace output, set the MONO_TRACE_LISTENER environment variable.
- The Options dictionary property has been renamed to FuseOptions, as this only holds options which are passed directly to the FUSE library. Any non-FUSE-supported options will be flagged as an error.
- A bool MultiThreaded property has been added, and the StartMultithreaded() method has been removed. Instead, Start consults the MultiThreaded property to determine whether FUSE should be started in a multithreaded context. You can use the -s command line argument to disable this, or explicitly set the MultiThreaded property to false. MultiThreaded is true by default.
- Nearly every protected virtual method has been renamed,
(and the parameters modified) in order to organize the methods by
name. Here are the groupings and renamings:
Previous Current Directory: methods which only act upon direcctories. OnCloseDirectory(string path, OpenedFileInfo info); OnCloseDirectory(string path, OpenedPathInfo info); OnCreateDirectory(string path, FilePermissions mode); OnOpenDirectory(string path, OpenedFileInfo info); OnOpenDirectory(string path, OpenedPathInfo info); OnReadDirectory(string path, out string[] paths, OpenedFileInfo info); OnReadDirectory(string path, OpenedPathInfo info, out IEnumerable<FileSystemEntry> paths); OnRemoveDirectory(string path); OnSynchronizeDirectory(string path, bool onlyUserData, OpenedFileInfo info); OnSynchronizeDirectory(string path, OpenedPathInfo info, bool onlyUserData); File: methods which only act upon file names. OnCreateFileNode(string path, FilePermissions perms, ulong dev); OnCreateSpecialFile(string path, FilePermissions perms, ulong dev); OnRemoveFile(string path); OnTruncateFile(string path, long length); FileSystem: methods which only act upon the file system as a whole. OnGetFileSystemStatistics(string path, out Statvfs buf); OnGetFileSystemStatus(string path, out Statvfs buf); Link: methods which deal with manipulation hard and symbolic links. OnCreateHardLink(string oldpath, string newpath); OnCreateSymbolicLink(string oldpath, string newpath); OnReadSymbolicLink(string path, StringBuilder buf, ulong bufsize); OnReadSymbolicLink(string path, out string target); Handle: methods which deal with a "handle" to an opened file. OnCreate(string path, FilePermissions mode, OpenedFileInfo info); OnCreateHandle(string path, OpenedPathInfo info, FilePermissions mode); OnFlush(string path, OpenedFileInfo info); OnFlushHandle(string path, OpenedPathInfo info); OnGetFileDescriptorAttributes(string path, out Stat buf, OpenedFileInfo info); OnGetHandleStatus(string path, OpenedPathInfo info, out Stat buf); OnOpen(string path, OpenedFileInfo info); OnOpenHandle(string path, OpenedPathInfo info); OnRead(string path, byte[] buf, long offset, OpenedFileInfo info, out int bytesWritten); OnReadHandle(string path, OpenedPathInfo info, byte[] buf, long offset, out int bytesWritten); OnWrite(string path, byte[] buf, long offset, OpenedFileInfo info, out int bytesRead); OnWriteHandle(string path, OpenedPathInfo info, byte[] buf, long offset, out int bytesRead); OnRelease(string path, OpenedFileInfo info); OnReleaseHandle(string path, OpenedPathInfo info); OnSynchronizeFileDescriptor(string path, bool onlyUserData, OpenedFileInfo info); OnSynchronizeHandle(string path, OpenedPathInfo info, bool onlyUserData); OnTruncateFileDescriptor(string path, long length, OpenedFileInfo info); OnTruncateHandle(string path, OpenedPathInfo info, long length); Path: methods which deal with a file system entry names as strings, and thus manipulate both files and directories. OnAccess(string path, AccessModes mode); OnAccessPath(string path, AccessModes mode); OnGetFileAttributes(string path, out Stat stat); OnGetPathStatus(string path, out Stat stat); OnRenameFile(string oldpath, string newpath); OnRenamePath (string oldpath, string newpath); OnChangePermissions(string path, FilePermissions mode); OnChangePathPermissions(string path, FilePermissions mode); OnChangeOwner(string path, long owner, long group); OnChangePathOwner(string path, long owner, long group); OnChangeTimes(string path, ref Utimbuf buf); OnChangePathTimes(string path, ref Utimbuf buf); OnGetExtendedAttributes(string path, string name, byte[] value, out int bytesWritten); OnGetPathExtendedAttribute(string path, string name, byte[] value, out int bytesWritten); OnListExtendedAttributes(string path, byte[] list, out int bytesWritten); OnListPathExtendedAttributes(string path, out string[] names); OnSetExtendedAttributes(string path, string name, byte[] value, XattrFlags flags); OnSetPathExtendedAttribute(string path, string name, byte[] value, XattrFlags flags); OnRemoveExtendedAttributes(string path, string name); OnRemovePathExtendedAttribute(string path, string name);
- FileSystemEntry: New type to associate a path string with a Mono.Unix.Native.Stat instance. Used by OnReadDirectory.
- FileSystemOperationContext:
- Remove the PrivateData member.
- UserId, GroupId, and ProcessId are now read-only properties instead of fields.
- ProcessId is now int, for constency with Mono.Unix.
- OpenedFileInfo has been renamed to OpenedPathInfo, as this type is used by both handle and directory methods. The long OpenedFileInfo.FileHandle property has been changed into a IntPtr Handle property.
Download
Mono.Fuse 0.3.0 is available from http://www.jprl.com/Projects/mono-fuse/mono-fuse-0.3.0.tar.gz. It can built with Mono 1.1.13 and later.
GIT Repository
A GIT repository for Mono.Fuse is at http://www.jprl.com/Projects/mono-fuse.git.
blog comments powered by Disqus