Contents

init(fileURLWithPath:relativeTo:)

Initializes a newly created file NSURL referencing the local file or directory at path, relative to a base URL.

Declaration

init(fileURLWithPath path: String, relativeTo baseURL: URL?)

Mentioned in

Discussion

Better to use initFileURLWithPath:isDirectory:relativeToURL: if you know if the path is a directory vs non-directory, as it saves an I/O.

See Also

Creating a URL object