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.
- iOS 8.0+
- macOS 10.10+
- tvOS 9.0+
- watchOS 2.0+
You obtain a directory enumerator using
enumerator(atPath:) 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.