Interface FtpClient
- All Known Implementing Classes:
FTPClientWrapper
public interface FtpClient
What VFS expects from an FTP client to provide.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanabort()appendFileStream(String relPath) booleanbooleandeleteFile(String relPath) voiddefault intbooleanhasFeature(String feature) Queries the server for a supported feature.booleanorg.apache.commons.net.ftp.FTPFile[]booleanmakeDirectory(String relPath) default InstantmdtmInstant(String relPath) Sends the MDTM command to get a file's date and time information after file transfer.booleanremoveDirectory(String relPath) booleanretrieveFileStream(String relPath) default InputStreamretrieveFileStream(String relPath, int bufferSize) retrieveFileStream(String relPath, long restartOffset) default voidsetBufferSize(int bufferSize) storeFileStream(String relPath)
-
Method Details
-
abort
- Throws:
IOException
-
appendFileStream
- Throws:
IOException
-
completePendingCommand
- Throws:
IOException
-
deleteFile
- Throws:
IOException
-
disconnect
- Throws:
IOException
-
getReplyCode
- Throws:
IOException
-
getReplyString
- Throws:
IOException
-
hasFeature
Queries the server for a supported feature.- Parameters:
feature- the name of the feature, converted to upper case.- Returns:
trueif the feature is present,falseif the feature is not present or the FTP command failed.- Throws:
IOException- on error- Since:
- 2.8.0
-
isConnected
- Throws:
FileSystemException
-
listFiles
- Throws:
IOException
-
makeDirectory
- Throws:
IOException
-
mdtmInstant
Sends the MDTM command to get a file's date and time information after file transfer. It is typically more accurate than the"LIST"command response. Time values are always represented in UTC (GMT), and in the Gregorian calendar regardless of what calendar may have been in use at the date and time the file was last modified.NOTE: not all remote FTP servers support
MDTM.- Parameters:
relPath- The relative path of the file object to executeMDTMcommand against- Returns:
- new
Instantobject containing theMDTMtimestamp. - Throws:
IOException- If the underlying FTP client encountered an error.- Since:
- 2.8.0
-
removeDirectory
- Throws:
IOException
-
rename
- Throws:
IOException
-
retrieveFileStream
- Throws:
IOException
-
retrieveFileStream
- Throws:
IOException
-
retrieveFileStream
- Throws:
IOException
-
setBufferSize
- Throws:
FileSystemException
-
storeFileStream
- Throws:
IOException
-