NSTask
NSTask
- Subject: NSTask
- From: email@hidden
- Date: Mon, 26 Jul 2010 14:39:42 -0600
We a user inserts a USB Thumb Drive or a Floppy in a USB Floppy Drive
I want to get the mount and remove two hidden directories:
.fseventsd
.Trashes
What should the launchPath be for [NSTask setLaunchPath:path] ? ?usr/
bin/rm is not valid i.e. where is rm?
NSTask *task1;
task1 = [[NSTask alloc] init];
[task1 setLaunchPath: @"/usr/bin/rm"];
NSMutableArray *arguments;
NSString* file = [path
stringByAppendingPathComponent:@".Trashes/._501"];
arguments = [NSArray arrayWithObjects: @"-r", @"-d", file, nil];
[task1 setArguments: arguments];
[task1 launch];
-koko
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden