In Objective-C, I am setting up an NSMetaDataQuery
and setting the setSearchScope:
for the query to search a specific users Documents folder. The search works but doesn't recurse down the directory tree, only searching in the Documents folder.
I've tried wildcards but no joy.
Here is basically what I've attempted, and it works except not searching below the Documents directory:
query = [[NSMetadataQuery alloc] init];
[query setSearchScopes:[NSArray arrayWithObjects:@"/Users/username/Documents/",nil]];
[query setPredicate:[NSPredicate predicateWithFormat:@"(kMDItemFSContentChangeDate >= '$time.this_week')"]];
[query startQuery];