Class SftpFileInfo

java.lang.Object
org.springframework.integration.file.remote.AbstractFileInfo<org.apache.sshd.sftp.client.SftpClient.DirEntry>
org.springframework.integration.sftp.session.SftpFileInfo
All Implemented Interfaces:
Comparable<FileInfo<org.apache.sshd.sftp.client.SftpClient.DirEntry>>, FileInfo<org.apache.sshd.sftp.client.SftpClient.DirEntry>

public class SftpFileInfo extends AbstractFileInfo<org.apache.sshd.sftp.client.SftpClient.DirEntry>
A FileInfo implementation for SFTP.
Since:
2.1
Author:
Gary Russell, Artem Bilan
  • Constructor Details

    • SftpFileInfo

      public SftpFileInfo(org.apache.sshd.sftp.client.SftpClient.DirEntry lsEntry)
  • Method Details

    • isDirectory

      public boolean isDirectory()
      Returns:
      true if the remote file is a directory
      See Also:
      • SftpClient.Attributes.isDirectory()
    • isLink

      public boolean isLink()
      Returns:
      true if the remote file is a link
      See Also:
      • SftpClient.Attributes.isSymbolicLink()
    • getSize

      public long getSize()
      Returns:
      the size of the remote file
      See Also:
      • SftpClient.Attributes.getSize()
    • getModified

      public long getModified()
      Returns:
      the modified time of the remote file
      See Also:
      • SftpClient.Attributes.getModifyTime()
    • getFilename

      public String getFilename()
      Returns:
      the name of the remote file
      See Also:
      • SftpClient.DirEntry.getFilename()
    • getPermissions

      public String getPermissions()
      Returns:
      a string representing the permissions of the remote file (e.g. -rw-r--r--).
    • getFileInfo

      public org.apache.sshd.sftp.client.SftpClient.DirEntry getFileInfo()
      Returns:
      the actual implementation from the underlying library, more sophisticated access is needed.