errnoToIOException
Converts platform.posix.errno to a string (e.g. ENOENT "ENOENT"
) as a prefix for the human-readable error message retrieved via strerror and returns it as an IOException. When platform.posix.errno is ENOENT, then this function will return FileNotFoundException. When platform.posix.errno is EINTR, then this function will return InterruptedIOException.
Return
The formatted error as an IOException
Parameters
Converts platform.posix.errno to a string (e.g. ENOENT "ENOENT"
) as a prefix for the human-readable error message retrieved via strerror and returns it as an IOException. When platform.posix.errno is ENOENT, then this function will return FileNotFoundException. When platform.posix.errno is EINTR, then this function will return InterruptedIOException.
If and only if the file parameter is non-null, an appropriate FileSystemException will be returned for the given platform.posix.errno.
EACCES or EPERM AccessDeniedException
EEXIST FileAlreadyExistsException
ENOTDIR NotDirectoryException
ENOTEMPTY DirectoryNotEmptyException
Else FileSystemException
Return
The formatted error as an IOException
Parameters
The error
The File (if any) to associate this error with a FileSystemException
If multiple files were involved, such as a copy operation.