Answered here in StackOverflow (I'm quoting kperryua):
Quoth the documentation:
kMDItemPath
Complete path to the file. This value of this attribute can be retrieved, but can't be used in a query or to sort search results.
That means that the attribute kMDItemPath
can only be used with a MDItem or NSMetadataItem to retrieve the path for an item already found. You cannot use it with an MDQuery or an NSMetadataQuery within the query predicate you specify to find files.