GMUserFileSystem |
Superclass: NSObject
Declared In: GMUserFileSystem
This class controls the life cycle of a user space file system.
The GMUserFileSystem is typically instantiated with a delegate that will
serve file system operations. The delegate needs to implement some or all of
the methods in the GMUserFileSystemOperations informal protocol. It may also
implement methods from the GMUserFileSystemLifecycle and
GMUserFileSystemResourceForks protocols as necessary.
After instantiating a GMUserFileSystem with an appropriate delegate, call
mountAtPath:withOptions: to mount the file system. A call to unmount or an
external umount operation will unmount the file system. If the delegate
implements methods from the GMUserFileSystemLifecycle informal protocol then
these will be called just before mount and unmount. In addition, the
GMUserFileSystem class will post mount and unmount notifications to the
default notification center. Since the underlying GMUserFileSystem
implementation is multi-threaded, you should assume that notifications will
not be posted on the main thread. The object will always be the
GMUserFileSystem* and the userInfo will always contain at least the
kGMUserFileSystemMountPathkey.
The best way to get started with GMUserFileSystem is to look at some example
file systems that use MacFUSE.framework. See the example file systems found
here.
initWithDelegate:isThreadSafe: |
Initialize the user space file system.
- (id)initWithDelegate:(id)delegate isThreadSafe:(BOOL)isThreadSafe;
delegate
isThreadSafe
A GMUserFileSystem instance.
The file system delegate should implement some or all of the GMUserFileSystemOperations informal protocol. You should only specify YES for isThreadSafe if your file system delegate is thread safe with respect to file system operations. That implies that it implements proper file system locking so that multiple operations on the same file can be done safely.
setDelegate: |
Set the file system delegate.
- (void)setDelegate:(id)delegate;
delegate
delegate |
Get the file system delegate.
- (id)delegate;
The file system delegate.
mountAtPath:withOptions: |
Mount the file system at the given path.
- (void)mountAtPath:(NSString *)mountPath withOptions:(NSArray *)options;
mountPath
options
Mounts the file system at mountPath with the given set of options. The set of available options can be found on the options wiki page. For example, to turn on debug output add @"debug" to the options NSArray. If the mount succeeds, then a kGMUserFileSystemDidMount notification is posted to the default noification center. If the mount fails, then a kGMUserFileSystemMountFailed notification will be posted instead.
mountAtPath:withOptions:shouldForeground:detachNewThread: |
Mount the file system at the given path with advanced options.
- (void)mountAtPath:(NSString *)mountPath withOptions:(NSArray *)options shouldForeground:(BOOL)shouldForeground // Recommend: YES detachNewThread:(BOOL)detachNewThread;
mountPath
options
shouldForeground
detachNewThread
Mounts the file system at mountPath with the given set of options. This is an advanced version of mountAtPath:withOptions You can use this to mount from a command-line program as follows:
unmount |
Unmount the file system.
- (void)unmount;
Unmounts the file system. The kGMUserFileSystemDidUnmount notification will be posted.
Last Updated: Monday, November 17, 2008