Recursively find files/directories within a directory

Posted by enchilada on Stack Overflow See other posts from Stack Overflow or by enchilada
Published on 2010-06-06T22:07:59Z Indexed on 2010/06/06 22:12 UTC
Read the original article Hit count: 268

Filed under:
|

I want to use enumeratorAtURL:includingPropertiesForKeys:options:errorHandler: to do this, as I'm coding under Snow Leopard.

I know how to use this method. However, as for my purposes it's not adequate to load the contents lazily, I have the following question:

How can I create an object hierarchy (of, say, the custom FileOrDirectory class with the standard children,count,isLeaf attributes) from the information I load from the enumeratorAtURL: method? I need to load this data beforehand, and show it in an outline view, for my purposes.

© Stack Overflow or respective owner

Related posts about objective-c

Related posts about cocoa