Interface FtpClient
- All Known Implementing Classes:
FTPClientWrapper
public interface FtpClient
What VFS expects from an FTP client to provide.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
abort()
appendFileStream
(String relPath) boolean
boolean
deleteFile
(String relPath) void
default int
boolean
hasFeature
(String feature) Queries the server for a supported feature.boolean
org.apache.commons.net.ftp.FTPFile[]
boolean
makeDirectory
(String relPath) default Instant
mdtmInstant
(String relPath) Sends the MDTM command to get a file's date and time information after file transfer.boolean
removeDirectory
(String relPath) boolean
retrieveFileStream
(String relPath) default InputStream
retrieveFileStream
(String relPath, int bufferSize) retrieveFileStream
(String relPath, long restartOffset) default void
setBufferSize
(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:
true
if the feature is present,false
if 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 executeMDTM
command against- Returns:
- new
Instant
object containing theMDTM
timestamp. - 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
-