I use this code to search for something *not* containing someString with
NSMetadataquery:
predicate = [NSPredicate predicateWithFormat:@"NOT kMDItemFSName LIKE '%@'",
someString];
As NSMetadataQuery only uses a subset of the NSPredicate syntax, I doubt
whether using NSCompoundPredicate or some
You'd keep most of what you have, but just add in the negation:
On May 21, 2012, at 11:47 AM, Chris Paveglio wrote:
> I'm doing an NSMetadataQuery something like this:
>
> NSPOT = NSLikePredicateOperatorType;
> myPredicate = [NSComparisonPredicate
> predicateWithLeftExpression:[NSExpressionexpre
I'm doing an NSMetadataQuery something like this:
NSPOT = NSLikePredicateOperatorType;
myPredicate = [NSComparisonPredicate
predicateWithLeftExpression:[NSExpressionexpressionForKeyPath:@"*"]
rightExpression:[NSExpressionexpressionForConstantValue:@"somestring"]
modifier:NSDirectPredicateModifier