An object that enumerates the contents of a directory.
- iOS 2.0+
- macOS 10.0+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
You obtain a directory enumerator using
enumerator(at method. The enumeration provides the pathnames of all files and directories contained within that directory. These pathnames are relative to the directory.
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.