• 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
Re: NSPipe / NSTask ls -> Array
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: NSPipe / NSTask ls -> Array
      • From: Shawn Erickson <email@hidden>
    • Re: NSPipe / NSTask ls -> Array
      • From: Jerry Krinock <email@hidden>
  • Prev by Date: Re: Drag and drop... without moving mouse?
  • Next by Date: Re: Predicate help needed
  • Previous by thread: printing NSView on top of page (not on center as is)
  • Next by thread: Re: NSPipe / NSTask ls -> Array
  • Index(es):
    • Date
    • Thread