Search options

2013-07-31 Thread dangerwillrobinsondanger
I have two questions. 
The simple one, if a file is invisible to the user but was previously visible 
(say renamed with a . prefix) can it still be found by NSMetadataQuery searches?

The more open ended one, what are the recommended search facilities for 
searching for things not indexed by Spotlight?
Or am I limited to task wrappers or NSFileManager directory enumerations? 
Clearly that could take a lot of time and resources to search that way. 

Thanks
JJ


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Search options

2013-07-31 Thread Jerry Krinock

On 2013 Jul 31, at 08:45, dangerwillrobinsondan...@gmail.com wrote:

 what are the recommended search facilities for searching for things not 
 indexed by Spotlight?  Or am I limited to task wrappers or NSFileManager 
 directory enumerations? Clearly that could take a lot of time and resources 
 to search that way.

Several years ago I looked into this and concluded that the fastest, *reliable* 
file search on Mac OS X was still the ancient PBCatalogSearchSync() or 
PBCatalogSearchAsync().  Does anyone know a more modern API which can beat 
these?

If not, you can still use my Cocoa wrapper…

http://github.com/jerrykrinock/ClassesObjC/blob/master/SSYCarbonSearcher.m

Demo project…

http://github.com/jerrykrinock/SSYCarbonSearcher



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Search options

2013-07-31 Thread Jean-Daniel Dupas

Le 31 juil. 2013 à 18:52, Jerry Krinock je...@ieee.org a écrit :

 
 On 2013 Jul 31, at 08:45, dangerwillrobinsondan...@gmail.com wrote:
 
 what are the recommended search facilities for searching for things not 
 indexed by Spotlight?  Or am I limited to task wrappers or NSFileManager 
 directory enumerations? Clearly that could take a lot of time and resources 
 to search that way.
 
 Several years ago I looked into this and concluded that the fastest, 
 *reliable* file search on Mac OS X was still the ancient 
 PBCatalogSearchSync() or PBCatalogSearchAsync().  Does anyone know a more 
 modern API which can beat these?

I don't know about modern API, but I know about low level way to query the FS: 
searchfs(3)

I think you can achieve performances equivalent to what you get using 
PBCatalogSearchSync using this function.


-- Jean-Daniel





___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Search options

2013-07-31 Thread Ken Thomases
On Jul 31, 2013, at 11:52 AM, Jerry Krinock wrote:

 On 2013 Jul 31, at 08:45, dangerwillrobinsondan...@gmail.com wrote:
 
 what are the recommended search facilities for searching for things not 
 indexed by Spotlight?  Or am I limited to task wrappers or NSFileManager 
 directory enumerations? Clearly that could take a lot of time and resources 
 to search that way.
 
 Several years ago I looked into this and concluded that the fastest, 
 *reliable* file search on Mac OS X was still the ancient 
 PBCatalogSearchSync() or PBCatalogSearchAsync().  Does anyone know a more 
 modern API which can beat these?

I haven't worked with it, but I think that the searchfs() system call is what 
underlies those routines at the BSD/POSIX layer.
https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man2/searchfs.2.html

Regards,
Ken


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Search options

2013-07-31 Thread Jerry Krinock

On 2013 Jul 31, at 11:29, Ken Thomases k...@codeweavers.com wrote:

 I haven't worked with it, but I think that the searchfs() system call is what 
 underlies those routines at the BSD/POSIX layer.
 https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man2/searchfs.2.html

Interesting.  This was my first time looking at searchfs(), but it's deja vu of 
PBCatalogSearchSync() or PBCatalogSearchAsync(), especially the crazy structs / 
parameter blocks.  And yes, the PBCatalogSearch stuff does seem to be the 
*higher* level API, because they feature the asynchronous flavor, which 
searchfs() does not.


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com