Class FtpFileSystem
java.lang.Object
org.frankframework.filesystem.ftp.FtpSession
org.frankframework.filesystem.ftp.FtpFileSystem
- All Implemented Interfaces:
 AutoCloseable,HasApplicationContext,HasPhysicalDestination,IConfigurable,IScopeProvider,HasKeystore,HasTruststore,IBasicFileSystem<FTPFileRef>,IWritableFileSystem<FTPFileRef>
@DestinationType(FILE_SYSTEM)
public class FtpFileSystem
extends FtpSession
implements IWritableFileSystem<FTPFileRef>
Implementation of FTP and FTPs FileSystem
- Author:
 - Daniƫl Meyer, Niels Meijer
 
- 
Nested Class Summary
Nested classes/interfaces inherited from class org.frankframework.filesystem.ftp.FtpSession
FtpSession.FileType, FtpSession.FtpType, FtpSession.Prot, FtpSession.TransportType - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionvoidappendFile(FTPFileRef file, InputStream content) voidclose()copyFile(FTPFileRef f, String destinationFolder, boolean createFolder) Copies the file to another folder.voidcreateFile(FTPFileRef file, InputStream content) voidcreateFolder(String folder) voidbooleanexists(FTPFileRef file) booleanfolderExists(String folder) longgetName(FTPFileRef file) Get a string representation of an identification of a file.intgetNumberOfFilesInFolder(String folder) getParentFolder(FTPFileRef file) booleanisFolder(FTPFileRef ftpFileRef) booleanisOpen()list(FTPFileRef folder, TypeFilter filter) moveFile(FTPFileRef f, String destinationFolder, boolean createFolder) Moves the file to another folder.voidopen()readFile(FTPFileRef f, String charset) voidremoveFolder(String folder, boolean removeNonEmptyFolder) renameFile(FTPFileRef source, FTPFileRef destination) Renames the file to a new name, possibly in another folder.voidsetRemoteDirectory(String remoteDirectory) pathname of the file or directory to list.Get a file 'F' representation of an identification of a file.Creates a reference to a file.Methods inherited from class org.frankframework.filesystem.ftp.FtpSession
close, configure, openClient, setAllowSelfSignedCertificates, setAuthAlias, setFileType, setFtpType, setHost, setIgnoreCertificateExpiredException, setKeyManagerAlgorithm, setKeystore, setKeystoreAlias, setKeystoreAliasAuthAlias, setKeystoreAliasPassword, setKeystoreAuthAlias, setKeystorePassword, setKeystoreType, setPassive, setPassword, setPort, setProt, setProxyHost, setProxyPort, setProxyTransportType, setTrustManagerAlgorithm, setTruststore, setTruststoreAuthAlias, setTruststorePassword, setTruststoreType, setUsername, setVerifyHostnameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.frankframework.core.HasApplicationContext
getApplicationContext, getConfigurationClassLoaderMethods inherited from interface org.frankframework.encryption.HasKeystore
getKeyManagerAlgorithm, getKeystore, getKeystoreAlias, getKeystoreAliasAuthAlias, getKeystoreAliasPassword, getKeystoreAuthAlias, getKeystorePassword, getKeystoreTypeMethods inherited from interface org.frankframework.encryption.HasTruststore
getTrustManagerAlgorithm, getTruststore, getTruststoreAuthAlias, getTruststorePassword, getTruststoreType, isAllowSelfSignedCertificates, isIgnoreCertificateExpiredException, isVerifyHostnameMethods inherited from interface org.frankframework.filesystem.IBasicFileSystem
configure, getCanonicalNameOrErrorMessage, list 
- 
Constructor Details
- 
FtpFileSystem
public FtpFileSystem() 
 - 
 - 
Method Details
- 
open
- Specified by:
 openin interfaceIBasicFileSystem<FTPFileRef>- Throws:
 FileSystemException
 - 
close
public void close()- Specified by:
 closein interfaceAutoCloseable- Specified by:
 closein interfaceIBasicFileSystem<FTPFileRef>- Overrides:
 closein classFtpSession
 - 
isOpen
public boolean isOpen()- Specified by:
 isOpenin interfaceIBasicFileSystem<FTPFileRef>
 - 
toFile
Description copied from interface:IBasicFileSystemGet a file 'F' representation of an identification of a file. Must pair up with the implementation ofIBasicFileSystem.getName(Object).- Specified by:
 toFilein interfaceIBasicFileSystem<FTPFileRef>- Throws:
 FileSystemException
 - 
toFile
public FTPFileRef toFile(@Nullable String folder, @Nullable String filename) throws FileSystemException Description copied from interface:IBasicFileSystemCreates a reference to a file. If filename is not absolute, it will be created in 'defaultFolder'.- Specified by:
 toFilein interfaceIBasicFileSystem<FTPFileRef>- Throws:
 FileSystemException
 - 
getNumberOfFilesInFolder
- Specified by:
 getNumberOfFilesInFolderin interfaceIBasicFileSystem<FTPFileRef>- Throws:
 FileSystemException
 - 
list
public DirectoryStream<FTPFileRef> list(FTPFileRef folder, TypeFilter filter) throws FileSystemException - Specified by:
 listin interfaceIBasicFileSystem<FTPFileRef>- Throws:
 FileSystemException
 - 
exists
- Specified by:
 existsin interfaceIBasicFileSystem<FTPFileRef>- Throws:
 FileSystemException
 - 
isFolder
- Specified by:
 isFolderin interfaceIBasicFileSystem<FTPFileRef>
 - 
createFile
- Specified by:
 createFilein interfaceIWritableFileSystem<FTPFileRef>- Parameters:
 file- FileSystem file referencecontent- to write or NULL. When NULL existing files should be overwritten, and new files should be created.- Throws:
 IOException
 - 
appendFile
- Specified by:
 appendFilein interfaceIWritableFileSystem<FTPFileRef>- Throws:
 IOException
 - 
readFile
- Specified by:
 readFilein interfaceIBasicFileSystem<FTPFileRef>- Throws:
 FileSystemExceptionIOException
 - 
deleteFile
- Specified by:
 deleteFilein interfaceIBasicFileSystem<FTPFileRef>- Throws:
 FileSystemException
 - 
folderExists
- Specified by:
 folderExistsin interfaceIBasicFileSystem<FTPFileRef>- Throws:
 FileSystemException
 - 
createFolder
- Specified by:
 createFolderin interfaceIBasicFileSystem<FTPFileRef>- Throws:
 FileSystemException
 - 
removeFolder
- Specified by:
 removeFolderin interfaceIBasicFileSystem<FTPFileRef>- Throws:
 FileSystemException
 - 
renameFile
Description copied from interface:IWritableFileSystemRenames the file to a new name, possibly in another folder. Does not need to check for the existence of the source or non-existence of the destination.- Specified by:
 renameFilein interfaceIWritableFileSystem<FTPFileRef>- Throws:
 FileSystemException
 - 
moveFile
public FTPFileRef moveFile(FTPFileRef f, String destinationFolder, boolean createFolder) throws FileSystemException Description copied from interface:IBasicFileSystemMoves the file to another folder. Does not need to check for existence of the source or non-existence of the destination. Returns the moved file, or null if no file was moved or there is no reference to the moved file.- Specified by:
 moveFilein interfaceIBasicFileSystem<FTPFileRef>- Throws:
 FileSystemException
 - 
copyFile
public FTPFileRef copyFile(FTPFileRef f, String destinationFolder, boolean createFolder) throws FileSystemException Description copied from interface:IBasicFileSystemCopies the file to another folder. Does not need to check for existence of the source or non-existence of the destination. Returns the copied file, or null if no file was copied or there is no reference to the copied file.- Specified by:
 copyFilein interfaceIBasicFileSystem<FTPFileRef>- Throws:
 FileSystemException
 - 
getFileSize
- Specified by:
 getFileSizein interfaceIBasicFileSystem<FTPFileRef>- Throws:
 FileSystemException
 - 
getName
Description copied from interface:IBasicFileSystemGet a string representation of an identification of a file. Must pair up with the implementation ofIBasicFileSystem.toFile(String). Can reflect name a file has in its folder, is not expected to be unique over folders.- Specified by:
 getNamein interfaceIBasicFileSystem<FTPFileRef>
 - 
getParentFolder
- Specified by:
 getParentFolderin interfaceIBasicFileSystem<FTPFileRef>
 - 
getCanonicalName
- Specified by:
 getCanonicalNamein interfaceIBasicFileSystem<FTPFileRef>
 - 
getModificationTime
- Specified by:
 getModificationTimein interfaceIBasicFileSystem<FTPFileRef>- Throws:
 FileSystemException
 - 
getAdditionalFileProperties
- Specified by:
 getAdditionalFilePropertiesin interfaceIBasicFileSystem<FTPFileRef>
 - 
getPhysicalDestinationName
- Specified by:
 getPhysicalDestinationNamein interfaceHasPhysicalDestination
 - 
setRemoteDirectory
pathname of the file or directory to list.- Default value
 - Home folder of the ftp user
 
 
 -