public class FtpFileSystem extends FtpSession implements IWritableFileSystem<FTPFileRef>
FtpSession.FileType, FtpSession.FtpType, FtpSession.Prot, FtpSession.TransportType
Constructor and Description |
---|
FtpFileSystem() |
Modifier and Type | Method and Description |
---|---|
OutputStream |
appendFile(FTPFileRef f) |
void |
close() |
FTPFileRef |
copyFile(FTPFileRef f,
String destinationFolder,
boolean createFolder,
boolean resultantMustBeReturned)
Copies the file to a another folder.
|
OutputStream |
createFile(FTPFileRef f) |
void |
createFolder(String folder) |
void |
deleteFile(FTPFileRef f) |
boolean |
exists(FTPFileRef file) |
boolean |
folderExists(String folder) |
Map<String,Object> |
getAdditionalFileProperties(FTPFileRef f) |
String |
getCanonicalName(FTPFileRef f) |
long |
getFileSize(FTPFileRef f) |
Date |
getModificationTime(FTPFileRef file) |
String |
getName(FTPFileRef file)
Get a string representation of an identification of a file.
|
int |
getNumberOfFilesInFolder(String folder) |
String |
getParentFolder(FTPFileRef file) |
String |
getPhysicalDestinationName() |
boolean |
isOpen() |
DirectoryStream<FTPFileRef> |
listFiles(String folder)
Lists all files in 'folder' or in the 'root' of the filesystem (when folder is null).
|
FTPFileRef |
moveFile(FTPFileRef f,
String destinationFolder,
boolean createFolder,
boolean resultantMustBeReturned)
Moves the file to a another folder.
|
void |
open() |
Message |
readFile(FTPFileRef f,
String charset) |
void |
removeFolder(String folder,
boolean removeNonEmptyFolder) |
FTPFileRef |
renameFile(FTPFileRef source,
FTPFileRef destination)
Renames the file to a new name, possibly in a another folder.
|
void |
setRemoteDirectory(String remoteDirectory)
pathname of the file or directory to list.
|
FTPFileRef |
toFile(String filename)
Get a file 'F' representation of an identification of a file.
|
FTPFileRef |
toFile(String folder,
String filename)
Creates a reference to a file.
|
close, configure, openClient, setAllowSelfSignedCertificates, setAuthAlias, setFileType, setFtpType, setHost, setIgnoreCertificateExpiredException, setKeyManagerAlgorithm, setKeystore, setKeystoreAlias, setKeystoreAliasAuthAlias, setKeystoreAliasPassword, setKeystoreAuthAlias, setKeystorePassword, setKeystoreType, setName, setPassive, setPassword, setPort, setProt, setProxyHost, setProxyPort, setProxyTransportType, setTrustManagerAlgorithm, setTruststore, setTruststoreAuthAlias, setTruststorePassword, setTruststoreType, setUsername, setVerifyHostname
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
configure
getDomain
getName
getKeyManagerAlgorithm, getKeystore, getKeystoreAlias, getKeystoreAliasAuthAlias, getKeystoreAliasPassword, getKeystoreAuthAlias, getKeystorePassword, getKeystoreType
getApplicationContext, getName
getConfigurationClassLoader
setApplicationContext
getTrustManagerAlgorithm, getTruststore, getTruststoreAuthAlias, getTruststorePassword, getTruststoreType, isAllowSelfSignedCertificates, isIgnoreCertificateExpiredException, isVerifyHostname
public void open() throws FileSystemException
open
in interface IBasicFileSystem<FTPFileRef>
FileSystemException
public void close()
close
in interface IBasicFileSystem<FTPFileRef>
close
in class FtpSession
public boolean isOpen()
isOpen
in interface IBasicFileSystem<FTPFileRef>
public FTPFileRef toFile(String filename) throws FileSystemException
IBasicFileSystem
IBasicFileSystem.getName(Object)
.toFile
in interface IBasicFileSystem<FTPFileRef>
FileSystemException
public FTPFileRef toFile(String folder, String filename) throws FileSystemException
IBasicFileSystem
toFile
in interface IBasicFileSystem<FTPFileRef>
FileSystemException
public int getNumberOfFilesInFolder(String folder) throws FileSystemException
getNumberOfFilesInFolder
in interface IBasicFileSystem<FTPFileRef>
FileSystemException
public DirectoryStream<FTPFileRef> listFiles(String folder) throws FileSystemException
IBasicFileSystem
listFiles
in interface IBasicFileSystem<FTPFileRef>
FileSystemException
public boolean exists(FTPFileRef file) throws FileSystemException
exists
in interface IBasicFileSystem<FTPFileRef>
FileSystemException
public OutputStream createFile(FTPFileRef f) throws FileSystemException, IOException
createFile
in interface IWritableFileSystem<FTPFileRef>
FileSystemException
IOException
public OutputStream appendFile(FTPFileRef f) throws FileSystemException, IOException
appendFile
in interface IWritableFileSystem<FTPFileRef>
FileSystemException
IOException
public Message readFile(FTPFileRef f, String charset) throws FileSystemException, IOException
readFile
in interface IBasicFileSystem<FTPFileRef>
FileSystemException
IOException
public void deleteFile(FTPFileRef f) throws FileSystemException
deleteFile
in interface IBasicFileSystem<FTPFileRef>
FileSystemException
public boolean folderExists(String folder) throws FileSystemException
folderExists
in interface IBasicFileSystem<FTPFileRef>
FileSystemException
public void createFolder(String folder) throws FileSystemException
createFolder
in interface IBasicFileSystem<FTPFileRef>
FileSystemException
public void removeFolder(String folder, boolean removeNonEmptyFolder) throws FileSystemException
removeFolder
in interface IBasicFileSystem<FTPFileRef>
FileSystemException
public FTPFileRef renameFile(FTPFileRef source, FTPFileRef destination) throws FileSystemException
IWritableFileSystem
renameFile
in interface IWritableFileSystem<FTPFileRef>
FileSystemException
public FTPFileRef moveFile(FTPFileRef f, String destinationFolder, boolean createFolder, boolean resultantMustBeReturned) throws FileSystemException
IBasicFileSystem
resultantMustBeReturned
is set, then an Exception must be thrown, preferably before the file is moved;resultantMustBeReturned
is not set, then a null result returned might also mean the file was moved successfully, but with unknown destination;moveFile
in interface IBasicFileSystem<FTPFileRef>
resultantMustBeReturned
- TODOFileSystemException
public FTPFileRef copyFile(FTPFileRef f, String destinationFolder, boolean createFolder, boolean resultantMustBeReturned) throws FileSystemException
IBasicFileSystem
resultantMustBeReturned
is set, then an Exception must be thrown, preferably before the file is copied;resultantMustBeReturned
is not set, then a null result returned might also mean the file was copied successfully, but with unknown destination;copyFile
in interface IBasicFileSystem<FTPFileRef>
resultantMustBeReturned
- TODOFileSystemException
public long getFileSize(FTPFileRef f) throws FileSystemException
getFileSize
in interface IBasicFileSystem<FTPFileRef>
FileSystemException
public String getName(FTPFileRef file)
IBasicFileSystem
IBasicFileSystem.toFile(String)
.
Can reflect name a file has in its folder, is not expected to be unique over folders.getName
in interface IBasicFileSystem<FTPFileRef>
public String getParentFolder(FTPFileRef file)
getParentFolder
in interface IBasicFileSystem<FTPFileRef>
public String getCanonicalName(FTPFileRef f)
getCanonicalName
in interface IBasicFileSystem<FTPFileRef>
public Date getModificationTime(FTPFileRef file) throws FileSystemException
getModificationTime
in interface IBasicFileSystem<FTPFileRef>
FileSystemException
public Map<String,Object> getAdditionalFileProperties(FTPFileRef f)
getAdditionalFileProperties
in interface IBasicFileSystem<FTPFileRef>
public String getPhysicalDestinationName()
getPhysicalDestinationName
in interface HasPhysicalDestination
public void setRemoteDirectory(String remoteDirectory)
Copyright © 2023 Frank!Framework. All rights reserved.