public class FtpRemoteFileTemplate extends RemoteFileTemplate<org.apache.commons.net.ftp.FTPFile>
RemoteFileTemplate providing type-safe access to
the underlying FTPClient object.sessionFactory| Constructor and Description |
|---|
FtpRemoteFileTemplate(SessionFactory<org.apache.commons.net.ftp.FTPFile> sessionFactory) |
| Modifier and Type | Method and Description |
|---|---|
protected <T> T |
doExecuteWithClient(ClientCallback<org.apache.commons.net.ftp.FTPClient,T> callback) |
<T,C> T |
executeWithClient(ClientCallback<C,T> callback)
Execute the callback's doWithClient method after obtaining a session's
client, providing access to low level methods.
|
boolean |
exists(String path)
Check if a file exists on the remote server.
|
afterPropertiesSet, append, append, execute, get, get, getRemoteFileSeparator, getSessionFactory, getSesssion, getTemporaryFileSuffix, isUseTemporaryFileName, list, remove, rename, send, send, setAutoCreateDirectory, setBeanFactory, setCharset, setFileNameExpression, setFileNameGenerator, setRemoteDirectoryExpression, setRemoteFileSeparator, setTemporaryFileSuffix, setTemporaryRemoteDirectoryExpression, setUseTemporaryFileNamepublic FtpRemoteFileTemplate(SessionFactory<org.apache.commons.net.ftp.FTPFile> sessionFactory)
public <T,C> T executeWithClient(ClientCallback<C,T> callback)
RemoteFileOperationsexecuteWithClient in interface RemoteFileOperations<org.apache.commons.net.ftp.FTPFile>executeWithClient in class RemoteFileTemplate<org.apache.commons.net.ftp.FTPFile>T - The type returned by ClientCallback.doWithClient(Object).C - The type of the underlying client object.callback - the ClientCallback.protected <T> T doExecuteWithClient(ClientCallback<org.apache.commons.net.ftp.FTPClient,T> callback)
public boolean exists(String path)
RemoteFileOperationsexists in interface RemoteFileOperations<org.apache.commons.net.ftp.FTPFile>exists in class RemoteFileTemplate<org.apache.commons.net.ftp.FTPFile>path - The full path to the file.