FileManager.DirectoryEnumerator
An object that enumerates the contents of a directory.
Declaration
class DirectoryEnumeratorOverview
You obtain a directory enumerator using FileManager’s enumerator(atPath:) 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.
Topics
Getting File and Directory Attributes
Skipping Subdirectories
Instance Properties
See Also
Discovering directory contents
contentsOfDirectory(at:includingPropertiesForKeys:options:)contentsOfDirectory(atPath:)enumerator(at:includingPropertiesForKeys:options:errorHandler:)enumerator(atPath:)mountedVolumeURLs(includingResourceValuesForKeys:options:)FileManager.VolumeEnumerationOptionssubpathsOfDirectory(atPath:)subpaths(atPath:)