iOS Developer Library — Prerelease

Developer

Foundation Framework Reference NSDirectoryEnumerator Class Reference

Options
Deployment Target:

On This Page
Language:

NSDirectoryEnumerator

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.

  • Causes the receiver to skip recursion into the most recently obtained subdirectory.

    Declaration

    Swift

    func skipDescendents()

    Objective-C

    - (void)skipDescendents

    Availability

    Available in iOS 2.0 and later.

  • Causes the receiver to skip recursion into the most recently obtained subdirectory.

    Declaration

    Swift

    func skipDescendants()

    Objective-C

    - (void)skipDescendants

    Discussion

    This method is identical to skipDescendents except for the spelling.

    Availability

    Available in iOS 4.0 and later.