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
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 “._”).
Copies the directory or file specified in a given path to a different location in the file system identified by another path.
Moves the directory or file specified by a given path to a different location in the file system identified by another path.
Deletes the file, link, or directory (including, recursively, all subdirectories, files, and links in the directory) identified by a given path.
Returns a dictionary that describes the attributes of the mounted file system on which a given path resides.
NSFileManager object sends this message to its handler for each error it encounters when copying, moving, removing, or linking files or directories.
NSFileManager object sends this message to a handler immediately before attempting to move, copy, rename, or delete, or before attempting to link to a given path.
This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.Learn more about using Apple's beta software