Re: NSPipe / NSTask ls -> Array
Re: NSPipe / NSTask ls -> Array
- Subject: Re: NSPipe / NSTask ls -> Array
- From: Prachi Gauriar <email@hidden>
- Date: Sat, 15 Jul 2006 22:58:59 -0400
On Jul 15, 2006, at 10:33 PM, email@hidden wrote:
as i read/tried nearly every example without being sucessfull so far
i hope getting some hints on this list.
I have to execute an "ls" on "/dev/tty.*" and use the results
as options in an NSPopupMenu.
Is there a reason you can't just do something like this:
NSArray *devContents = [[NSFileManager defaultManager]
directoryContentsAtPath:@"/dev"];
NSPredicate *ttyPredicate = [NSPredicate predicateWithFormat:@"SELF
beginswith 'tty.'"];
NSArray *ttys = [devContents filteredArrayUsingPredicate:ttyPredicate];
-Prachi
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden