Contents

init(_:)

Creates a file URL that references the local file or directory at the file path you specify.

Declaration

init?(_ path: FilePath)

Parameters

  • path:

    The location in the file system.

Discussion

This method may perform file system I/O to determine if the path is to a directory. If you know the path is to a directory, use init(_:isDirectory:) to avoid the file system I/O.

See Also

Creating a file URL from a file path