Returns the directories and files (including symbolic links) contained in a given directory.
- iOS 2.0–2.0Deprecated
- macOS 10.0–10.5Deprecated
- Mac Catalyst 13.0–13.0Deprecated
- tvOS 9.0–9.0Deprecated
- watchOS 2.0–2.0Deprecated
A path to a directory.
An array of
NSString objects identifying the directories and files (including symbolic links) contained in
path. Returns an empty array if the directory exists but has no contents. Returns
nil if the directory specified at
path does not exist or there is some other error accessing it.
The search is shallow, and therefore does not return the contents of any subdirectories and does not traverse symbolic links in the specified directory. This returned array does not contain strings for the current directory (“
.”), parent directory (“
..”), or resource forks (begin with “._”).
Because this method does not return error information, it has been deprecated as of OS X v10.5. Use