createSymbolicLink(at:withDestination:)
Creates a symbolic link between two files.
- iOS
- 13.0+
- macOS
- 10.15+
- tvOS
- 13.0+
- watchOS
- 6.0+
func createSymbolicLink(at linkPath: FilePath, withDestination destinationPath: FilePath) async throws Parameters
- linkPath
The path at which to create the symbolic link.
- destinationPath
The path that contains the item that the symbolic link points to.`
A link is created at linkPath which points to destinationPath. The destination of a symbolic link can be read with destinationOfSymbolicLink(at:).
Errors
Error codes thrown include:
fileAlreadyExistsif a file exists atdestinationPath.
Implementation details
Uses the link(2) system call.