Creates a list of directory search paths.


func NSSearchPathForDirectoriesInDomains(_ directory: FileManager.SearchPathDirectory, _ domainMask: FileManager.SearchPathDomainMask, _ expandTilde: Bool) -> [String]


Creates a list of path strings for the specified directories in the specified domains. The list is in the order in which you should search the directories. If expandTilde is true, tildes are expanded as described in expandingTildeInPath.

You should consider using the FileManager methods urls(for:in:) and url(for:in:appropriateFor:create:). which return URLs, which are the preferred format.

For more information on file system utilities, see File System Programming Guide.

See Also

Locating System Directories

func urls(for: FileManager.SearchPathDirectory, in: FileManager.SearchPathDomainMask) -> [URL]

Returns an array of URLs for the specified common directory in the requested domains.

func NSOpenStepRootDirectory() -> String

Returns the root directory of the user’s system.