xyz
xyz

Reputation: 2282

Directory at path content filtering

is there possibility to 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.

Upvotes: 0

Views: 409

Answers (1)

Joshua Nozzi
Joshua Nozzi

Reputation: 61228

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.

Upvotes: 1

Related Questions