NSSearchPathForDirectoriesInDomains(_:_:_:)
Creates a list of directory search paths.
Declaration
func NSSearchPathForDirectoriesInDomains(_ directory: FileManager.SearchPathDirectory, _ domainMask: FileManager.SearchPathDomainMask, _ expandTilde: Bool) -> [String]Discussion
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.