Creates a hard link between the items at the specified paths.
- iOS 2.0+
- macOS 10.5+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
The path that specifies the item you wish to link to. The value in this parameter must not be
The path that identifies the location where the link will be created. The value in this parameter must not be
true if the hard link was created or
false if an error occurred. This method also returns
false if a file, directory, or link already exists at
Use this method to create hard links between files in the current file system. If
src is a directory, this method creates a new directory at
dst and then creates hard links for the items in that directory. If
src is (or contains) a symbolic link, the symbolic link is copied to the new location and not converted to a hard link.
Prior to linking each item, the file manager asks its delegate if it should actually create the link. It does this by calling the
file method; if that method is not implemented it calls the
file method instead. If the delegate method returns
true, or if the delegate does not implement the appropriate methods, the file manager creates the hard link. If there is an error linking one out of several items, the file manager may also call the delegate’s
file method to determine how to proceed.