public interface FtpClient
Modifier and Type | Method and Description |
---|---|
boolean |
abort() |
OutputStream |
appendFileStream(String relPath) |
boolean |
completePendingCommand() |
boolean |
deleteFile(String relPath) |
void |
disconnect() |
default int |
getReplyCode() |
String |
getReplyString() |
boolean |
hasFeature(String feature)
Queries the server for a supported feature.
|
boolean |
isConnected() |
org.apache.commons.net.ftp.FTPFile[] |
listFiles(String relPath) |
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 |
rename(String oldName,
String newName) |
InputStream |
retrieveFileStream(String relPath) |
default InputStream |
retrieveFileStream(String relPath,
int bufferSize) |
InputStream |
retrieveFileStream(String relPath,
long restartOffset) |
default void |
setBufferSize(int bufferSize) |
OutputStream |
storeFileStream(String relPath) |
boolean abort() throws IOException
IOException
OutputStream appendFileStream(String relPath) throws IOException
IOException
boolean completePendingCommand() throws IOException
IOException
boolean deleteFile(String relPath) throws IOException
IOException
void disconnect() throws IOException
IOException
default int getReplyCode() throws IOException
IOException
String getReplyString() throws IOException
IOException
boolean hasFeature(String feature) throws IOException
feature
- the name of the feature, converted to upper case.true
if the feature is present, false
if the feature is not present or the FTP command
failed.IOException
- on errorboolean isConnected() throws FileSystemException
FileSystemException
org.apache.commons.net.ftp.FTPFile[] listFiles(String relPath) throws IOException
IOException
boolean makeDirectory(String relPath) throws IOException
IOException
default Instant mdtmInstant(String relPath) throws IOException
"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
.
relPath
- The relative path of the file object to execute MDTM
command againstInstant
object containing the MDTM
timestamp.IOException
- If the underlying FTP client encountered an error.boolean removeDirectory(String relPath) throws IOException
IOException
boolean rename(String oldName, String newName) throws IOException
IOException
InputStream retrieveFileStream(String relPath) throws IOException
IOException
default InputStream retrieveFileStream(String relPath, int bufferSize) throws IOException
IOException
InputStream retrieveFileStream(String relPath, long restartOffset) throws IOException
IOException
default void setBufferSize(int bufferSize) throws FileSystemException
FileSystemException
OutputStream storeFileStream(String relPath) throws IOException
IOException
Copyright © 2002–2020 The Apache Software Foundation. All rights reserved.