Instance Method

fileManager:shouldProceedAfterError:

An NSFileManager object sends this message to its handler for each error it encounters when copying, moving, removing, or linking files or directories.

Declaration

- (BOOL)fileManager:(NSFileManager *)fm shouldProceedAfterError:(NSDictionary *)errorInfo;

Parameters

manager

The file manager that sent this message.

errorInfo

A dictionary that contains two or three pieces of information (all NSString objects) related to the error:

Key

Value

@"Path"

The path related to the error (usually the source path)

@"Error"

A description of the error

@"ToPath"

The destination path (not all errors)

Return Value

YES if the operation (which is often continuous within a loop) should proceed, otherwise NO.

Discussion

An NSFileManager object, manager, sends this message for each error it encounters when copying, moving, removing, or linking files or directories. The return value is passed back to the invoker of copyPath:toPath:handler:, movePath:toPath:handler:, removeFileAtPath:handler:, or linkPath:toPath:handler:. If an error occurs and your handler has not implemented this method, the invoking method automatically returns NO.

See Also

Deprecated Methods

copyPath:toPath:handler:

Copies the directory or file specified in a given path to a different location in the file system identified by another path.

Deprecated
movePath:toPath:handler:

Moves the directory or file specified by a given path to a different location in the file system identified by another path.

Deprecated
removeFileAtPath:handler:

Deletes the file, link, or directory (including, recursively, all subdirectories, files, and links in the directory) identified by a given path.

Deprecated
changeFileAttributes:atPath:

Changes the attributes of a given file or directory.

Deprecated
fileAttributesAtPath:traverseLink:

Returns a dictionary that describes the POSIX attributes of the file specified at a given.

Deprecated
fileSystemAttributesAtPath:

Returns a dictionary that describes the attributes of the mounted file system on which a given path resides.

Deprecated
directoryContentsAtPath:

Returns the directories and files (including symbolic links) contained in a given directory.

Deprecated
createDirectoryAtPath:attributes:

Creates a directory (without contents) at a given path with given attributes.

Deprecated
createSymbolicLinkAtPath:pathContent:

Creates a symbolic link identified by a given path that refers to a given location.

Deprecated
pathContentOfSymbolicLinkAtPath:

Returns the path of the directory or file that a symbolic link at a given path refers to.

Deprecated
linkPath:toPath:handler:

Creates a link from a source to a destination.

Deprecated
fileManager:willProcessPath:

An NSFileManager object sends this message to a handler immediately before attempting to move, copy, rename, or delete, or before attempting to link to a given path.

Deprecated