• 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: Finding other apps' paths - deterministically!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Finding other apps' paths - deterministically!


  • Subject: Re: Finding other apps' paths - deterministically!
  • From: Tommy Nordgren <email@hidden>
  • Date: Mon, 22 Sep 2008 00:00:19 +0200


On Sep 21, 2008, at 11:25 PM, Peter O'Gorman wrote:

Peter O'Gorman wrote:
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'

Dunno how I missed the -x, does not matter though, find -x / on a large
filesystem with many files will take too long.


Peter

Sure, but you don't need to do the scan every time. See the comment on caching.




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 /.

------
What is a woman that you forsake her, and the hearth fire and the home acre,
to go with the old grey Widow Maker. --Kipling, harp song of the Dane women
Tommy Nordgren
email@hidden




_______________________________________________

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


References: 
 >Finding other apps' paths - deterministically! (From: Jerry Krinock <email@hidden>)
 >Re: Finding other apps' paths - deterministically! (From: Tommy Nordgren <email@hidden>)
 >Re: Finding other apps' paths - deterministically! (From: "Michael Ash" <email@hidden>)
 >Re: Finding other apps' paths - deterministically! (From: Tommy Nordgren <email@hidden>)
 >Re: Finding other apps' paths - deterministically! (From: Peter O'Gorman <email@hidden>)
 >Re: Finding other apps' paths - deterministically! (From: Peter O'Gorman <email@hidden>)

  • Prev by Date: Re: Appropriateness of assign attribute and -fobj-gc-only
  • Next by Date: Re: Appropriateness of assign attribute and -fobj-gc-only
  • Previous by thread: Re: Finding other apps' paths - deterministically!
  • Next by thread: Re: Finding other apps' paths - deterministically!
  • Index(es):
    • Date
    • Thread