Initializer
init(fileURLWithPath:relativeTo:)
iOS 8.0+Deprecated
iPadOS 8.0+Deprecated
Mac Catalyst 8.0+Deprecated
macOS 10.10+Deprecated
tvOS 9.0+Deprecated
visionOS 1.0+Deprecated
watchOS 2.0+Deprecated
Deprecated
Use init(filePath:directoryHint:relativeTo:) instead
Creates a file URL that references the local file or directory at the given path, relative to a base URL.
init(fileURLWithPath path: String, relativeTo base: URL?)
Parameters
pathThe location in the file system.
baseA base URL to resolve the path against.
Discussion
If an empty string is used for the path, the system interprets it as “.”.