Spring Integration

org.springframework.integration.sftp.session
Class SftpFileInfo

java.lang.Object
  extended by org.springframework.integration.file.remote.AbstractFileInfo<com.jcraft.jsch.ChannelSftp.LsEntry>
      extended by org.springframework.integration.sftp.session.SftpFileInfo
All Implemented Interfaces:
java.lang.Comparable<FileInfo<com.jcraft.jsch.ChannelSftp.LsEntry>>, FileInfo<com.jcraft.jsch.ChannelSftp.LsEntry>

public class SftpFileInfo
extends AbstractFileInfo<com.jcraft.jsch.ChannelSftp.LsEntry>

A FileInfo implementation for SFTP.

Since:
2.1
Author:
Gary Russell

Constructor Summary
SftpFileInfo(com.jcraft.jsch.ChannelSftp.LsEntry lsEntry)
           
 
Method Summary
 com.jcraft.jsch.ChannelSftp.LsEntry getFileInfo()
           
 java.lang.String getFilename()
           
 long getModified()
           
 java.lang.String getPermissions()
           
 long getSize()
           
 boolean isDirectory()
           
 boolean isLink()
           
 
Methods inherited from class org.springframework.integration.file.remote.AbstractFileInfo
compareTo, getRemoteDirectory, setRemoteDirectory, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SftpFileInfo

public SftpFileInfo(com.jcraft.jsch.ChannelSftp.LsEntry lsEntry)
Method Detail

isDirectory

public boolean isDirectory()
Returns:
true if the remote file is a directory
See Also:
SftpATTRS.isDir()

isLink

public boolean isLink()
Returns:
true if the remote file is a link
See Also:
SftpATTRS.isLink()

getSize

public long getSize()
Returns:
the size of the remote file
See Also:
SftpATTRS.getSize()

getModified

public long getModified()
Returns:
the modified time of the remote file
See Also:
SftpATTRS.getMTime()

getFilename

public java.lang.String getFilename()
Returns:
the name of the remote file
See Also:
ChannelSftp.LsEntry.getFilename()

getPermissions

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

getFileInfo

public com.jcraft.jsch.ChannelSftp.LsEntry getFileInfo()
Returns:
the actual implementation from the underlying library, more sophisticated access is needed.

Spring Integration