Your browser does not support HTML5 local storage or you have disabled it. Some functionality on this site, including saving your privacy settings and offering you special discounts, uses local storage and may not work with local storage disabled. We recommend allowing the use of local storage in your browser. In some browsers, it is the same setting used for disabling cookies.


com.ssh.sft
Class FileAttributes

java.lang.Object
  extended bycom.ssh.sft.SftLib
      extended bycom.ssh.sft.SftBase
          extended bycom.ssh.sft.FileAttributes
All Implemented Interfaces:
Cloneable, com.ssh.sft.SftLibConstants, com.ssh.sft.SshSftFileType

public class FileAttributes
extends com.ssh.sft.SftBase
implements com.ssh.sft.SshSftFileType, Cloneable

A collection of file attributes. Instances of this class are records that collect various attributes that a file may have. The record is wholly transparent: the fields are public and the user may create and modify instances of this class. Not all attributes are always set. When a field has a value of null or -1, it indicates that the attribute is unset, i.e. not available or not meant to be modified.


Field Summary
 Dateaccess_time
          The time of the last access to the file.
 Datecreate_time
          The time of creation of the file.
 longgid
          The group ID of the file.
 Stringgroup
          The name of the group of the file.
 Datemodify_time
          The time of the last modificaction of the file.
 Stringowner
          The name of the owner of the file.
 longpermissions
          The permissions of the file as a standard UNIX mode value.
 longsize
          The size of the file in bytes.
static intSSH_SFT_DIR_RECURSIVE
           
static intSSH_SFT_FILE_TYPE_DIRECTORY
           
static intSSH_SFT_FILE_TYPE_REGULAR
           
static intSSH_SFT_FILE_TYPE_SPECIAL
           
static intSSH_SFT_FILE_TYPE_SYMLINK
           
static intSSH_SFT_FILE_TYPE_UNKNOWN
           
static intSSH_SFT_HASH_MAX_BLOCK_SIZE
           
static intSSH_SFT_HASH_MAX_ITERATIONS
           
static intSSH_SFT_HASH_MIN_BLOCK_SIZE
           
static intSSH_SFT_REQUEST_MAX_NUM
           
static intSSH_SFT_REQUEST_MAX_SIZE
           
 inttype
          The type of the file.
 longuid
          The user ID of the file.
 
Constructor Summary
FileAttributes()
          Constructs a new FileAttributes object with all of the attributes initially unset.
 
Method Summary
 FileAttributescopy()
          Returns a new FileAttributes object with the same fields as this one.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

type

public int type
The type of the file. One of SSH_SFT_FILE_TYPE_REGULAR, SSH_SFT_FILE_TYPE_DIRECTORY, SSH_SFT_FILE_TYPE_SYMLINK, SSH_SFT_FILE_TYPE_SPECIAL or SSH_SFT_FILE_TYPE_UNKNOWN.


size

public long size
The size of the file in bytes.


owner

public String owner
The name of the owner of the file. This attribute is only available when using version 4 or later of the SFTP protocol.


group

public String group
The name of the group of the file. This attribute is only available when using version 4 or later of the SFTP protocol.


uid

public long uid
The user ID of the file. This attribute is only available when using version 3 of the SFTP protocol.


gid

public long gid
The group ID of the file. This attribute is only available when using version 3 of the SFTP protocol.


create_time

public Date create_time
The time of creation of the file. This attribute is only available when using version 4 or later of the SFTP protocol. Even then this attribute is probably unset, as few SFTP servers or back-end filesystems support recording the creation time.


access_time

public Date access_time
The time of the last access to the file.


modify_time

public Date modify_time
The time of the last modificaction of the file.


permissions

public long permissions
The permissions of the file as a standard UNIX mode value.


SSH_SFT_FILE_TYPE_REGULAR

public static final int SSH_SFT_FILE_TYPE_REGULAR
See Also:
Constant Field Values

SSH_SFT_FILE_TYPE_DIRECTORY

public static final int SSH_SFT_FILE_TYPE_DIRECTORY
See Also:
Constant Field Values

SSH_SFT_FILE_TYPE_SYMLINK

public static final int SSH_SFT_FILE_TYPE_SYMLINK
See Also:
Constant Field Values

SSH_SFT_FILE_TYPE_SPECIAL

public static final int SSH_SFT_FILE_TYPE_SPECIAL
See Also:
Constant Field Values

SSH_SFT_FILE_TYPE_UNKNOWN

public static final int SSH_SFT_FILE_TYPE_UNKNOWN
See Also:
Constant Field Values

SSH_SFT_REQUEST_MAX_SIZE

public static final int SSH_SFT_REQUEST_MAX_SIZE
See Also:
Constant Field Values

SSH_SFT_REQUEST_MAX_NUM

public static final int SSH_SFT_REQUEST_MAX_NUM
See Also:
Constant Field Values

SSH_SFT_HASH_MAX_ITERATIONS

public static final int SSH_SFT_HASH_MAX_ITERATIONS
See Also:
Constant Field Values

SSH_SFT_HASH_MIN_BLOCK_SIZE

public static final int SSH_SFT_HASH_MIN_BLOCK_SIZE
See Also:
Constant Field Values

SSH_SFT_HASH_MAX_BLOCK_SIZE

public static final int SSH_SFT_HASH_MAX_BLOCK_SIZE
See Also:
Constant Field Values

SSH_SFT_DIR_RECURSIVE

public static final int SSH_SFT_DIR_RECURSIVE
See Also:
Constant Field Values
Constructor Detail

FileAttributes

public FileAttributes()
Constructs a new FileAttributes object with all of the attributes initially unset.

Method Detail

copy

public FileAttributes copy()
Returns a new FileAttributes object with the same fields as this one.



===AUTO_SCHEMA_MARKUP===