Question

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.

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top