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 Link icon

    • SftpFileInfo Link icon

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

    • isDirectory Link icon

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

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

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

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

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

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

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