fileURL(withPathComponents:)
Initializes and returns a newly created NSURL object as a file URL with specified path components.
Declaration
class func fileURL(withPathComponents components: [String]) -> URL?Parameters
- components:
An array of path components.
Return Value
An NSURL object initialized with components.
Discussion
The path components are separated by a forward slash in the returned URL.
See Also
Creating a URL object
init(string:)init(string:encodingInvalidCharacters:)init(string:relativeTo:)fileURL(withPath:isDirectory:)init(fileURLWithPath:isDirectory:)fileURL(withPath:relativeTo:)init(fileURLWithPath:relativeTo:)fileURL(withPath:isDirectory:relativeTo:)init(fileURLWithPath:isDirectory:relativeTo:)fileURL(withPath:)init(fileURLWithPath:)init(resolvingAliasFileAt:options:)init(resolvingBookmarkData:options:relativeTo:bookmarkDataIsStale:)fileURL(withFileSystemRepresentation:isDirectory:relativeTo:)getFileSystemRepresentation(_:maxLength:)