Instance Method

destinationOfSymbolicLink(atPath:)

Returns the path of the item pointed to by a symbolic link.

Declaration

func destinationOfSymbolicLink(atPath path: String) throws -> String

Parameters

path

The path of a file or directory.

Return Value

An NSString object containing the path of the directory or file to which the symbolic link path refers. If the symbolic link is specified as a relative path, that relative path is returned.

Discussion

See Also

Creating Symbolic and Hard Links

func createSymbolicLink(at: URL, withDestinationURL: URL)

Creates a symbolic link at the specified URL that points to an item at the given URL.

func createSymbolicLink(atPath: String, withDestinationPath: String)

Creates a symbolic link that points to the specified destination.

func linkItem(at: URL, to: URL)

Creates a hard link between the items at the specified URLs.

func linkItem(atPath: String, toPath: String)

Creates a hard link between the items at the specified paths.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software