com.tibco.ax.fw.runtime.transport.sshftp
Interface FileAttr


public interface FileAttr

This object is returned when a directory list is requested. It can be used to individually examine the entries of the directory. Note that the returned values reflect what the peer ssh server (and the sftp subsystem) returns. The implemented methods on this interface give control over examining the name, size, last access/modification, file status properties of the entries.


Method Summary
 java.util.Date getLastAccess()
          Retrieve the time and date of the last access to this file.
 java.util.Date getLastMod()
          Retrieve the time and date of the last modification to this file.
 java.lang.String getName()
          Obtain the name of the file.
 long getSize()
          Obtain the size of the file in bytes.
 boolean isDir()
          Check if the object defined by this attribute is a directory.
 boolean isFile()
          Check if the object defined by this attribute is a file.
 

Method Detail

getName

java.lang.String getName()
Obtain the name of the file.

Returns:
The name of the file.

isDir

boolean isDir()
Check if the object defined by this attribute is a directory.

Returns:
true if the object is a directory.

isFile

boolean isFile()
Check if the object defined by this attribute is a file.

Returns:
true if the object is a file.

getSize

long getSize()
Obtain the size of the file in bytes.

Returns:
The size of the file in bytes.

getLastAccess

java.util.Date getLastAccess()
Retrieve the time and date of the last access to this file. The resulting date instance will be in the local timezone. The value will be as accurate as provided by the ssh server. If the date cannot be determined based on the value returned by the server, the default 1/01/1970 00:00:00 UTC will be used.

Returns:
The time and date of the last access to this file.

getLastMod

java.util.Date getLastMod()
Retrieve the time and date of the last modification to this file. The resulting date instance will be in the local timezone. The value will be as accurate as provided by the ssh server. If the date cannot be determined based on the value returned by the server, the default 1/01/1970 00:00:00 UTC will be used.

Returns:
The time and date of the last modification to this file.