Contents

init(fileURLWithPath:isDirectory:relativeTo:)

Creates a file URL that references the local file or directory at the given path, relative to a base URL.

Declaration

init(fileURLWithPath path: String, isDirectory: Bool, relativeTo base: URL?)

Parameters

  • path:

    The location in the file system.

  • isDirectory:

    A Boolean value that indicates whether the location is a directory.

  • base:

    A URL that provides a file system location that the path extends.

Discussion

If the path is an empty string, the system interprets it as “.”.

See Also

Creating a file URL from a string path