• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSTask
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: NSTask
      • From: Sherm Pendley <email@hidden>
    • Re: NSTask
      • From: Bill Bumgarner <email@hidden>
  • Prev by Date: Re: iPhone orientation problems
  • Next by Date: Re: NSTask
  • Previous by thread: Re: Cannot Validate Property - ioValue
  • Next by thread: Re: NSTask
  • Index(es):
    • Date
    • Thread