Performs a deep enumeration of the specified directory and returns the paths of all of the contained subdirectories.
- iOS 2.0+
- macOS 10.5+
- UIKit for Mac 13.0+Beta
- tvOS 9.0+
- watchOS 2.0+
The path of the directory to list.
If an error occurs, upon return contains an
NSErrorobject that describes the problem. Pass
NULLif you don’t want error information.
An array of strings, each containing the path of an item in the directory specified by
nil if an error occurred.
This method recurses the specified directory and its subdirectories. The method skips the “
.” and “
..” directories at each level of the recursion.
Because this method recurses the directory’s contents, you might not want to use it in performance-critical code. Instead, consider using the
enumerator method to enumerate the directory contents yourself. Doing so gives you more control over the retrieval of items and more opportunities to complete the enumeration or perform other tasks at the same time.