开发者

Directory at path content filtering

开发者 https://www.devze.com 2023-01-24 17:50 出处:网络
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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消