Re: Spotlight and Leopard
Pierce Freeman wrote:
Due to problems with Spotlight not searching other drives on
default, I have
decided on integrating the UNIX find command. Please reply with
you have regarding this, including (please) something about saving the
locations of the files that it found to an array.
Spotlight does search other drives "on default", if I understand "on
default" correctly. I have a couple Firewire drives that will be
searched by Spotlight when they are connected, but not searched when
unconnected. Spotlight finds information on these drives exactly the
same as it finds information on the builtin drives. I also have all
my internal drives partitioned, and Spotlight finds information on
those volumes just fine. If you have a situation where Spotlight
does not search a drive, you will have to provide details of the
drive and its Spotlight status (e.g. is it excluded in the Privacy
list) to explain what you mean by "not searching other drives on
There is a big difference between using Spotlight and using the
'find' command. Before anyone can reasonably reply with ideas
regarding the use of 'find', you will first have to explain what
files you're searching for, where you're searching for them
(networked or not), what your search criteria are, and why you think
'find' will work better at this than Spotlight.
If you save the output of 'find' to an array, it can become stale
(i.e. wrong) if the user makes any changes to the filenames or the
locations of files listed in the array. Without knowing anything
about what you're trying to find or why, or the lifetime of the
results, it's impossible to advise about the efficacy of storing the
output in an array.
Since 'find' delivers results incrementally, as it finds matching
items, that seems more like an iterator or enumerator model to me.
You could collect all the results into an array, by waiting for
'find' to t...
erminate, but if 'find' produces a lot of output before
the rest of your program can start processing it, you might consume a
lot of memory for no good reason.
Cocoa-dev mailing list (Cocoa-dev@xxxxxxxxxxxxxxx)
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 maillists@xxxxxxxxx