NSDirectory 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.
- iOS 2.0+
- macOS 10.0+
- tvOS 9.0+
- watchOS 2.0+
You obtain a directory enumerator using
enumerator(at 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.