3
ファイルのパスにある文字列を検索するSpotlightクエリを作成しようとしています(ファイルの名前またはフォルダはに含まれています)。kMDItemPathの検索でSpotlightの結果が表示されない
NSPredicate *predicateTemplate = [NSPredicate predicateWithFormat: @"kMDItemPath like[wcd] $SEARCH";
[query setPredicate:
[predicateTemplate predicateWithSubstitutionVariables:
[NSDictionary dictionaryWithObject:searchingFor forKey:@"SEARCH"]
]
];
[query startQuery];
は、この常に1を、以下の場合にも、0の結果を返します。
NSPredicate *predicateTemplate = [NSPredicate predicateWithFormat: @"kMDItemDisplayName in[wcd] $SEARCH";
戻って1つの以上の結果。 MacOS X 10.5.8でこれをテストしています。ドキュメントquothが