init(fileURLWithPath:)
Creates a file URL that references the local file or directory at the given path.
Declaration
init(fileURLWithPath path: String)Parameters
- path:
The location in the file system.
Discussion
If the path is an empty string, the system interprets it as “.”.
See Also
Creating a file URL from a string path
init(filePath:directoryHint:relativeTo:)URL.DirectoryHintinit(fileURLWithPath:isDirectory:)init(fileURLWithPath:relativeTo:)init(fileURLWithPath:isDirectory:relativeTo:)init(fileURLWithFileSystemRepresentation:isDirectory:relativeTo:)init(fileReferenceLiteralResourceName:)init(filePath:directoryHint:)