File System Error Codes

Recognize common error codes generated by file system operations.

Topics

Error Codes

NSFileNoSuchFileError

A filesystem operation was attempted on a non-existent file.

NSFileLockingError

The file could not be locked.

NSFileReadUnknownError

Could not read, for unknown reasons.

NSFileReadNoPermissionError

Could not read because of a permission problem.

NSFileReadInvalidFileNameError

Could not read because of an invalid file name.

NSFileReadCorruptFileError

Could not read because of a corrupted file, bad format, or similar reason.

NSFileReadNoSuchFileError

Could not read because no such file was found.

NSFileReadInapplicableStringEncodingError

Could not read because the string encoding wasn’t applicable.

NSFileReadUnsupportedSchemeError

Could not read because the specified URL scheme is unsupported.

NSFileReadTooLargeError

Could not read because the specified file was too large.

NSFileReadUnknownStringEncodingError

Could not read because the string coding of the file couldn’t be determined.

NSFileWriteUnknownError

Could not write, for unknown reasons.

NSFileWriteNoPermissionError

Could not write because of a permission problem.

NSFileWriteInvalidFileNameError

Could not write because of an invalid file name.

NSFileWriteFileExistsError

Could not perform an operation because the destination file already exists.

NSFileWriteInapplicableStringEncodingError

Could not write because the string encoding was not applicable.

NSFileWriteUnsupportedSchemeError

Could not write because the specified URL scheme is unsupported.

NSFileWriteOutOfSpaceError

Could not write because of a lack of disk space.

NSFileWriteVolumeReadOnlyError

Could not write because the volume is read-only.

NSFileManagerUnmountBusyError

The volume couldn’t be unmounted because it’s in use.

NSFileManagerUnmountUnknownError

The volume couldn't be unmounted, for unknown reasons.

NSFileErrorMinimum

The start of the range of error codes reserved for file errors.

NSFileErrorMaximum

The end of the range of error codes reserved for file errors.