Re: NSPipe / NSTask ls -> Array
Re: NSPipe / NSTask ls -> Array
- Subject: Re: NSPipe / NSTask ls -> Array
- From: James Bucanek <email@hidden>
- Date: Sun, 16 Jul 2006 09:04:31 -0700
Andrew Farmer wrote on Sunday, July 16, 2006:
>On 16 Jul 06, at 02:06, email@hidden wrote:
>> I'm afraid (this is my next step, after choosing my tty. device) i
>> should not use NSTask / NSPipe with "cat /dev/tty.jaddajadda" either?
>
>Absolutely not! Just open the device yourself and read from it. There's
>no reason to spawn a separate process just to read from a device.
I'll also agree with the other posters that there is absolutely no reason to use NSTask to get a directory listing.
But for future reference, there was also no reason (at least in this instance) why you needed to launch bash either. 'ls' is an executable, and you should have simply launched '/bin/ls' directly.
--
James Bucanek
_______________________________________________
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