Instance Method

fileManager:shouldLinkItemAtPath:toPath:

Asks the delegate if a hard link should be created between the items at the two paths.

Declaration

- (BOOL)fileManager:(NSFileManager *)fileManager shouldLinkItemAtPath:(NSString *)srcPath toPath:(NSString *)dstPath;

Parameters

fileManager

The file manager object that is attempting to create the link.

srcPath

The path or a file or directory that fileManager is about to attempt to link.

dstPath

The path or a file or directory to which fileManager is about to attempt to link.

Return Value

YES if the operation should proceed, otherwise NO.

Discussion

If the item specified by destURL is a directory, returning NO prevents links from being created to both the directory and its children.

This method performs the same task as the fileManager:shouldLinkItemAtURL:toURL: method, which is preferred over this method in macOS 10.6 and later.

See Also

Linking an Item

- fileManager:shouldLinkItemAtURL:toURL:

Asks the delegate if a hard link should be created between the items at the two URLs.

- fileManager:shouldProceedAfterError:linkingItemAtURL:toURL:

Asks the delegate if the operation should continue after an error occurs while linking to the item at the specified URL.

- fileManager:shouldProceedAfterError:linkingItemAtPath:toPath:

Asks the delegate if the operation should continue after an error occurs while linking to the item at the specified path.