| Inherits from | |
| Conforms to | |
| Framework | /System/Library/Frameworks/Foundation.framework |
| Availability | Available in Mac OS X v10.0 and later. |
| Companion guide | |
| Declared in | NSFileManager.h |
| Related sample code |
An NSDirectoryEnumerator object enumerates the contents of a directory, returning the pathnames of all files and directories contained within that directory. These pathnames are relative to the directory.
You obtain a directory enumerator using NSFileManager’s enumeratorAtPath: method. For more details, see Low-Level File Management Programming Topics.
An enumeration is recursive, including the files of all subdirectories, and crosses device boundaries. An enumeration does not resolve symbolic links, or attempt to traverse symbolic links that point to directories.
Returns an NSDictionary object that contains the attributes of the directory at which enumeration started.
- (NSDictionary *)directoryAttributes
An NSDictionary object that contains the attributes of the directory at which enumeration started.
See the description of the fileAttributesAtPath:traverseLink: method of NSFileManager for details on obtaining the attributes from the dictionary.
createDirectoryAtPath:attributes: (NSFileManager)NSFileManager.hReturns an object that contains the attributes of the most recently returned file or subdirectory (as referenced by the pathname).
- (NSDictionary *)fileAttributes
A dictionary that contains the attributes of the most recently returned file or subdirectory (as referenced by the pathname).
See the description of the fileAttributesAtPath:traverseLink: method of NSFileManager for details on obtaining the attributes from the dictionary.
NSFileManager.hReturns the number of levels deep the current object is in the directory hierarchy being enumerated.
- (NSUInteger)level
The number of levels, with the directory passed to enumeratorAtURL:includingPropertiesForKeys:options:errorHandler: (NSFileManager) considered to be level 0.
NSFileManager.hCauses the receiver to skip recursion into the most recently obtained subdirectory.
- (void)skipDescendants
This method is identical to skipDescendents except for the spelling.
NSFileManager.hCauses the receiver to skip recursion into the most recently obtained subdirectory.
- (void)skipDescendents
NSFileManager.hLast updated: 2009-05-28