Class FTPFileRef
java.lang.Object
org.apache.commons.net.ftp.FTPFile
org.frankframework.filesystem.ftp.FTPFileRef
- All Implemented Interfaces:
Serializable
public class FTPFileRef
extends org.apache.commons.net.ftp.FTPFile
Wrapper around a FTPFile to allow for relative path operations
- Author:
- Niels Meijer
- See Also:
-
Field Summary
Fields inherited from class org.apache.commons.net.ftp.FTPFile
DIRECTORY_TYPE, EXECUTE_PERMISSION, FILE_TYPE, GROUP_ACCESS, READ_PERMISSION, SYMBOLIC_LINK_TYPE, UNKNOWN_TYPE, USER_ACCESS, WORLD_ACCESS, WRITE_PERMISSION
-
Constructor Summary
ConstructorsConstructorDescriptionFTPFileRef
(String name) Create a new file reference, strips the folder of the filename when presentFTPFileRef
(String name, String folder) -
Method Summary
Modifier and TypeMethodDescriptionstatic FTPFileRef
fromFTPFile
(org.apache.commons.net.ftp.FTPFile ftpFile) Creates a deep-copy of FTPFilestatic FTPFileRef
fromFTPFile
(org.apache.commons.net.ftp.FTPFile ftpFile, String folder) Creates a deep-copy of FTPFile, relative to the provided folderReturns the filename, not the full (relative) pathgetName()
Returns the canonical name inclusive file path when presentvoid
Strip folder prefix of filename if present.toString()
void
updateFTPFile
(org.apache.commons.net.ftp.FTPFile ftpFile) Update the FTPFile attributesMethods inherited from class org.apache.commons.net.ftp.FTPFile
getGroup, getHardLinkCount, getLink, getRawListing, getSize, getTimestamp, getTimestampInstant, getType, getUser, hasPermission, isDirectory, isFile, isSymbolicLink, isUnknown, isValid, setGroup, setHardLinkCount, setLink, setPermission, setRawListing, setSize, setTimestamp, setType, setUser, toFormattedString, toFormattedString
-
Constructor Details
-
FTPFileRef
Create a new file reference, strips the folder of the filename when present -
FTPFileRef
- Parameters:
name
- A canonical name might be provided, strip the path when present and only use the actual file name.folder
- The directory the file. This always has precedence over the canonical path provided by the name.
-
-
Method Details
-
getFileName
Returns the filename, not the full (relative) path -
setName
Strip folder prefix of filename if present. May not be changed after creation- Overrides:
setName
in classorg.apache.commons.net.ftp.FTPFile
-
getName
Returns the canonical name inclusive file path when present- Overrides:
getName
in classorg.apache.commons.net.ftp.FTPFile
-
toString
- Overrides:
toString
in classorg.apache.commons.net.ftp.FTPFile
-
updateFTPFile
public void updateFTPFile(org.apache.commons.net.ftp.FTPFile ftpFile) Update the FTPFile attributes -
fromFTPFile
Creates a deep-copy of FTPFile -
fromFTPFile
Creates a deep-copy of FTPFile, relative to the provided folder
-