Class SftpFileRef

java.lang.Object
org.frankframework.filesystem.sftp.SftpFileRef

public class SftpFileRef extends Object
Wrapper around a FTPFile to allow for relative path operations
Author:
Niels Meijer
  • Constructor Details

    • SftpFileRef

      public SftpFileRef(String name)
    • SftpFileRef

      public SftpFileRef(String name, String folder)
      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

      public String getFilename()
      Returns the filename, not the full (relative) path
    • getName

      public String getName()
      Returns the canonical name inclusive file path when present
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • fromLsEntry

      public static SftpFileRef fromLsEntry(com.jcraft.jsch.ChannelSftp.LsEntry entry)
      Creates a deep-copy of LsEntry
    • fromLsEntry

      public static SftpFileRef fromLsEntry(com.jcraft.jsch.ChannelSftp.LsEntry entry, String folder)
      Creates a deep-copy of LsEntry, relative to the provided folder
    • getSize

      public long getSize()
    • getAttrs

      public com.jcraft.jsch.SftpATTRS getAttrs()
    • setAttrs

      public void setAttrs(com.jcraft.jsch.SftpATTRS attributes)