December 2013
Beginner
576 pages
16h 4m
English
Sometimes you need to get a list of the contents of a directory. This enumeration process can be accomplished using either the enumeratorAtPath: or the contentsOfDirectoryAtPath:error method. In the former case, each file in the specified directory is enumerated one at a time and, by default, if one of those files is a directory, its contents are also recursively enumerated. During this process, you can dynamically prevent this recursion by sending a skipDescendants message to an enumeration object so that its contents will not be enumerated.
In the case of contentsOfDirectoryAtPath:error:, the contents of the specified directory are enumerated, and the file list is returned in an array by the method. If ...
Read now
Unlock full access