fileManager(_:shouldLinkItemAt:to:)
Asks the delegate if a hard link should be created between the items at the two URLs.
Declaration
optional func fileManager(_ fileManager: FileManager, shouldLinkItemAt srcURL: URL, to dstURL: URL) -> BoolParameters
- fileManager:
The file manager object that is attempting to create the link.
- srcURL:
The URL identifying the new hard link to be created.
- dstURL:
The URL identifying the destination of the link.
Return Value
true if the link should be created or false if it should not be created.
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(_:shouldLinkItemAtPath:toPath:) method and is preferred over that method in macOS 10.6 and later.