fileManager(_:shouldLinkItemAtPath:toPath:)
Asks the delegate if a hard link should be created between the items at the two paths.
Declaration
optional func fileManager(_ fileManager: FileManager, shouldLinkItemAtPath srcPath: String, toPath dstPath: String) -> BoolParameters
- fileManager:
The file manager object that is attempting to create the link.
- srcPath:
The path or a file or directory that
fileManageris about to attempt to link. - dstPath:
The path or a file or directory to which
fileManageris about to attempt to link.
Return Value
Discussion
If the item specified by destURL is a directory, returning false prevents links from being created to both the directory and its children.
This method performs the same task as the fileManager(_:shouldLinkItemAt:to:) method, which is preferred over this method in macOS 10.6 and later.