I have built a Union File System using Objective C and the read only
file system template for XCode - mostly by copying code from the
loopback file system.  I have it working except I do not have a clue
as to how to process command line arguments in ObjectiveC/Cocoa.

My main (provided by the xcode template for macfuse) looks like this:

#import <Cocoa/Cocoa.h>

int main(int argc, char *argv[])
{
    return NSApplicationMain(argc,  (const char **) argv);
}

argv contains a number of directories that need to be passed into the
files system implementation provided by the xcode template (this one:)

@interface unionfs_Filesystem : NSObject  {
        NSArray *paths;  //the paths that go in the array, in the order they
will be searched.
}

>From what code do I add the paths into the unionfs_Filesystem object?
Currently, I just hard code them in the init function for unionfs.

- (id)init {
        if ((self = [super init])) {
                paths = [NSArray arrayWithObjects: 
@"/Users/doug/junk/a",@"/Users/
doug/junk/b",nil];
                return self;
        }
        return nil;
}






Doug Ransom


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"MacFUSE" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/macfuse?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to