toIOException
Converts the throwable to an IOException if it is not already one. When errorCodeOrNull is ENOENT
, then this function will return FileNotFoundException. When the errorCodeOrNull is EINTR
, then this function will return InterruptedIOException. When the errorCodeOrNull starts with ERR_FS_
, then this function will return FileSystemException.
Converts the throwable to an IOException if it is not already one. When errorCodeOrNull is ENOENT
, then this function will return FileNotFoundException. When the errorCodeOrNull is EINTR
, then this function will return InterruptedIOException. When the errorCodeOrNull starts with ERR_FS_
, then this function will return FileSystemException.
If the file parameter is non-null, an appropriate FileSystemException will be returned for the given errorCodeOrNull.
EACCES
orEPERM
AccessDeniedExceptionEEXIST
FileAlreadyExistsExceptionENOTDIR
NotDirectoryExceptionENOTEMPTY
DirectoryNotEmptyExceptionElse FileSystemException
Return
The formatted error as an IOException
Parameters
The File (if any) to associate this error with a FileSystemException
If multiple files were involved, such as a copy operation.