Can a Spotlight search follow aliases / symlinks?
Can a Spotlight search follow aliases / symlinks?
- Subject: Can a Spotlight search follow aliases / symlinks?
- From: Gabriel Zachmann <email@hidden>
- Date: Fri, 07 Oct 2016 19:26:52 +0100
I am doing Spotlight searches using the NSMetadataQuery API.
Usually, my search is limited to a specific folder.
Is it possible to make it follow aliases (and symlinks) that might exist in that folder?
I am especially interested in aliases/symlinks that point to other folders.
Or do I have to find all the symlinks/aliases first, follow them "manually",
then set up a Spotlight search with a list of directories?
Best regards,
Gabriel.
Encl.:
For your reference, the code I use for initiating the Spotlight search is the following:
query_ = [[NSMetadataQuery alloc] init];
NSPredicate * predicate = [NSPredicate predicateWithFormat: @"(kMDItemContentTypeTree = 'public.image') && (kMDItemFSSize > %u) && (kMDItemPixelHeight > %u) && (kMDItemPixelWidth > %u)",
excludekB_ * 1024, excludeSize_, excludeSize_ ];
[query_ setSearchScopes: [NSArray arrayWithObject: dir]];
[query_ setPredicate: predicate];
[query_ startQuery];
queryProgressTimer_ = [NSTimer scheduledTimerWithTimeInterval: QueryProgressUpdateTime
target: self
selector: @selector(checkOnQuery:)
userInfo: nil
repeats: YES];
_______________________________________________
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