Contents

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