Returns an array of strings identifying the paths for all items in the specified directory.
- iOS 2.0+
- macOS 10.0+
- tvOS 9.0+
- watchOS 2.0+
The path of the directory to list.
An array of
NSString objects, each of which contains the path of an item in the directory specified by
path is a symbolic link, this method traverses the link. This method returns
nil if it cannot retrieve the device of the linked-to file.
This method recurses the specified directory and its subdirectories. The method skips the “
.” and “
..” directories at each level of the recursion.
This method reveals every element of the subtree at
path, including the contents of file packages (such as apps, nib files, and RTFD files). This code fragment gets the contents of
/System/Library/Fonts after verifying that the directory exists:
In macOS 10.5 and later, use