Instance Method


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


- (NSString *)destinationOfSymbolicLinkAtPath:(NSString *)path error:(NSError * _Nullable *)error;



The path of a file or directory.


If an error occurs, upon return contains an NSError object that describes the problem. Pass NULL if you do not want error information.

Return Value

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


See Also

Creating Symbolic and Hard Links

- createSymbolicLinkAtURL:withDestinationURL:error:

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

- createSymbolicLinkAtPath:withDestinationPath:error:

Creates a symbolic link that points to the specified destination.

- linkItemAtURL:toURL:error:

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

- linkItemAtPath:toPath:error:

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