Instance Method

destinationOfSymbolicLinkAtPath:error:

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

Declaration

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

Parameters

path

The path of a file or directory.

error

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.

Discussion

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.