public interface FileSystemExceptionFactory
FileSystemException
s based on replies from an SFTP server.
It's often not possible to distinguish different types of errors without inspecting the error message.
This interface allows users to provide their own mapping, based on SftpException
s.
Modifier and Type | Method and Description |
---|---|
FileSystemException |
createChangeWorkingDirectoryException(String directory,
SftpException exception)
Creates a
FileSystemException that indicates a directory cannot be used as the current working directory. |
FileSystemException |
createCopyException(String file,
String other,
SftpException exception)
Creates a
FileSystemException that indicates a file or directory cannot be copied. |
FileSystemException |
createCreateDirectoryException(String directory,
SftpException exception)
Creates a
FileSystemException that indicates a directory cannot be created. |
FileSystemException |
createDeleteException(String file,
SftpException exception,
boolean isDirectory)
Creates a
FileSystemException that indicates a file or directory cannot be deleted. |
FileSystemException |
createGetFileException(String file,
SftpException exception)
Creates a
FileSystemException that indicates a file or directory cannot be retrieved. |
FileSystemException |
createListFilesException(String directory,
SftpException exception)
Creates a
FileSystemException that indicates the contents of a directory cannot be retrieved. |
FileSystemException |
createMoveException(String file,
String other,
SftpException exception)
Creates a
FileSystemException that indicates a file or directory cannot be moved. |
FileSystemException |
createNewInputStreamException(String file,
SftpException exception)
Creates a
FileSystemException that indicates a file cannot be opened for reading. |
FileSystemException |
createNewOutputStreamException(String file,
SftpException exception,
Collection<? extends OpenOption> options)
Creates a
FileSystemException that indicates a file cannot be opened for writing. |
FileSystemException |
createReadLinkException(String link,
SftpException exception)
Creates a
FileSystemException that indicates a symbolic link cannot be read. |
FileSystemException |
createSetGroupException(String file,
SftpException exception)
Creates a
FileSystemException that indicates the group of a file or directory cannot be set. |
FileSystemException |
createSetModificationTimeException(String file,
SftpException exception)
Creates a
FileSystemException that indicates the modification time of a file or directory cannot be set. |
FileSystemException |
createSetOwnerException(String file,
SftpException exception)
Creates a
FileSystemException that indicates the owner of a file or directory cannot be set. |
FileSystemException |
createSetPermissionsException(String file,
SftpException exception)
Creates a
FileSystemException that indicates the permissions of a file or directory cannot be set. |
FileSystemException createGetFileException(String file, SftpException exception)
FileSystemException
that indicates a file or directory cannot be retrieved.file
- A string identifying the file or directory.exception
- The SftpException
that was thrown.FileSystemException
.FileSystemException createReadLinkException(String link, SftpException exception)
FileSystemException
that indicates a symbolic link cannot be read.link
- A string identifying the symbolic link.exception
- The SftpException
that was thrown.FileSystemException
.FileSystemException createListFilesException(String directory, SftpException exception)
FileSystemException
that indicates the contents of a directory cannot be retrieved.directory
- A string identifying the directory.exception
- The SftpException
that was thrown.FileSystemException
.FileSystemException createChangeWorkingDirectoryException(String directory, SftpException exception)
FileSystemException
that indicates a directory cannot be used as the current working directory.directory
- A string identifying the directory.exception
- The SftpException
that was thrown.FileSystemException
.FileSystemException createCreateDirectoryException(String directory, SftpException exception)
FileSystemException
that indicates a directory cannot be created.directory
- A string identifying the directory.exception
- The SftpException
that was thrown.FileSystemException
.FileSystemException createDeleteException(String file, SftpException exception, boolean isDirectory)
FileSystemException
that indicates a file or directory cannot be deleted.file
- A string identifying the file or directory.exception
- The SftpException
that was thrown.isDirectory
- true
if a directory cannot be deleted, or false
if a file cannot be deleted.FileSystemException
.FileSystemException createNewInputStreamException(String file, SftpException exception)
FileSystemException
that indicates a file cannot be opened for reading.file
- A string identifying the file.exception
- The SftpException
that was thrown.FileSystemException
.FileSystemException createNewOutputStreamException(String file, SftpException exception, Collection<? extends OpenOption> options)
FileSystemException
that indicates a file cannot be opened for writing.file
- A string identifying the file.exception
- The SftpException
that was thrown.options
- The open options used to open the file.FileSystemException
.FileSystemException createCopyException(String file, String other, SftpException exception)
FileSystemException
that indicates a file or directory cannot be copied.file
- A string identifying the file or directory to be copied.other
- A string identifying the file or directory to be copied to.exception
- The SftpException
that was thrown.FileSystemException
.FileSystemException createMoveException(String file, String other, SftpException exception)
FileSystemException
that indicates a file or directory cannot be moved.file
- A string identifying the file or directory to be moved.other
- A string identifying the file or directory to be moved to.exception
- The SftpException
that was thrown.FileSystemException
.FileSystemException createSetOwnerException(String file, SftpException exception)
FileSystemException
that indicates the owner of a file or directory cannot be set.file
- A string identifying the file or directory to set the owner of.exception
- The SftpException
that was thrown.FileSystemException
.FileSystemException createSetGroupException(String file, SftpException exception)
FileSystemException
that indicates the group of a file or directory cannot be set.file
- A string identifying the file or directory to set the group of.exception
- The SftpException
that was thrown.FileSystemException
.FileSystemException createSetPermissionsException(String file, SftpException exception)
FileSystemException
that indicates the permissions of a file or directory cannot be set.file
- A string identifying the file or directory to set the permissions of.exception
- The SftpException
that was thrown.FileSystemException
.FileSystemException createSetModificationTimeException(String file, SftpException exception)
FileSystemException
that indicates the modification time of a file or directory cannot be set.file
- A string identifying the file or directory to set the modification time of.exception
- The SftpException
that was thrown.FileSystemException
.Copyright © 2016–2023. All rights reserved.