Re: Finding other apps' paths - deterministically!
Re: Finding other apps' paths - deterministically!
- Subject: Re: Finding other apps' paths - deterministically!
- From: Peter O'Gorman <email@hidden>
- Date: Sun, 21 Sep 2008 14:49:17 -0500
Tommy Nordgren wrote:
>
> On Sep 21, 2008, at 6:36 AM, Michael Ash wrote:
>
>> On Sat, Sep 20, 2008 at 12:57 PM, Tommy Nordgren
>> <email@hidden> wrote:
>>> Use NSTask with the command line find -x / -name '*.app'
>>> Do this on a separate thread, and cache the result.
>>
>> I highly recommend against this approach. One problem is that it will
>> fail badly if any of the returned paths contain the \n character,
> Not true. With the given command line, find will return absolute paths.
> So this anomaly is easily detected when parsing find output
>>
Don't do find /, please! It could end up looking through every directory
entry on a remote petabyte filesystem. Even if you restrict it to
"local" storage, you could be going to the network for iSCSI devices,
and if you avoid that, some people have multi-terabyte filesystems with
a lot of directory entries, they will be disappointed in any software
that does a find /.
Peter
_______________________________________________
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