• 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
Can a Spotlight search follow aliases / symlinks?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Help - Epic Browser SPDY Encrypted Proxy Failing in Sierra
  • Next by Date: Directory enumeration gives wrong file type for aliases
  • Previous by thread: Re: Help - Epic Browser SPDY Encrypted Proxy Failing in Sierra
  • Next by thread: Directory enumeration gives wrong file type for aliases
  • Index(es):
    • Date
    • Thread