is there possibility to开发者_Python百科 retrive from NSFileManager paths without paths specified in some kind of filters without if's ? I know that there is a method includingPropertiesForKeys, but it can have only predefined keys, i would like to use custom ones...
Dose anybody encouter similar issus ?
Any sugestions are appreciated.
The only way to filter using NSFileManager is to do it yourself as you described (loop the contents, examine the properties, add matches to a "matches" array). The ...includingPropertiesForKeys:... part isn't a filter, it just pre-fetches the desired properties so you don't have to fetch them for each returned file path.
Or you could use a Spotlight query.
精彩评论