Sun Adapter for Batch/FTP

com.stc.connector.ssh.ftp.client.impl
Class SFTPFileAttributesImpl

java.lang.Object
  extended by com.stc.connector.ssh.ftp.client.impl.SFTPFileAttributesImpl
All Implemented Interfaces:
SFTPFileAttributes

public class SFTPFileAttributesImpl
extends java.lang.Object
implements SFTPFileAttributes

Author:
jfu

Field Summary
 
Fields inherited from interface com.stc.connector.ssh.ftp.client.SFTPFileAttributes
S_IFBLK, S_IFCHR, S_IFDIR, S_IFIFO, S_IFLNK, S_IFMT, S_IFREG, S_IFSOCK, S_IRGRP, S_IROTH, S_IRUSR, S_ISGID, S_ISUID, S_IWGRP, S_IWOTH, S_IWUSR, S_IXGRP, S_IXOTH, S_IXUSR, SSH_FILEXFER_TYPE_DIRECTORY, SSH_FILEXFER_TYPE_REGULAR, SSH_FILEXFER_TYPE_SPECIAL, SSH_FILEXFER_TYPE_SYMLINK, SSH_FILEXFER_TYPE_UNKNOWN
 
Method Summary
static SFTPFileAttributes createFileAttributes(com.maverick.sftp.SftpFileAttributes attr)
           
 long getAccessedTime()
          Get the last accessed time.
 long getCreationTime()
          Get the creation time of this file.
 java.lang.String getGID()
          Get the GID of this file.
 java.lang.String getMaskString()
          Return the UNIX style mode mask
 long getModifiedTime()
          Get the last modified time.
 int getPermissions()
          Get the current permissions value.
 java.lang.String getPermissionsString()
          Returns a formatted permissions string.
 long getSize()
          Get the size of the file.
 int getType()
          the type of the entry: public static final int SSH_FILEXFER_TYPE_DIRECTORY=2; public static final int SSH_FILEXFER_TYPE_REGULAR=1; public static final int SSH_FILEXFER_TYPE_SPECIAL=4; public static final int SSH_FILEXFER_TYPE_SYMLINK=3; public static final int SSH_FILEXFER_TYPE_UNKNOWN=5;
 java.lang.String getUID()
          Get the UID of the owner.
 boolean isBlock()
          Determine whether these attributes refer to a block special file.
 boolean isCharacter()
          Determine whether these attributes refer to a character device.
 boolean isDirectory()
          Determine whether these attributes refer to a directory
 boolean isFifo()
          Determine whether these attributes refer to a pipe.
 boolean isFile()
          Determine whether these attributes refer to a file.
 boolean isFlagSet(int flag)
          Determine if a permissions flag is set.
 boolean isLink()
          Determine whether these attributes refer to a symbolic link.
 boolean isSocket()
          Determine whether these attributes refer to a socket.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createFileAttributes

public static SFTPFileAttributes createFileAttributes(com.maverick.sftp.SftpFileAttributes attr)

getAccessedTime

public long getAccessedTime()
Description copied from interface: SFTPFileAttributes
Get the last accessed time.

Specified by:
getAccessedTime in interface SFTPFileAttributes

getCreationTime

public long getCreationTime()
Description copied from interface: SFTPFileAttributes
Get the creation time of this file.

Specified by:
getCreationTime in interface SFTPFileAttributes

getGID

public java.lang.String getGID()
Description copied from interface: SFTPFileAttributes
Get the GID of this file.

Specified by:
getGID in interface SFTPFileAttributes

getMaskString

public java.lang.String getMaskString()
Description copied from interface: SFTPFileAttributes
Return the UNIX style mode mask

Specified by:
getMaskString in interface SFTPFileAttributes

getModifiedTime

public long getModifiedTime()
Description copied from interface: SFTPFileAttributes
Get the last modified time.

Specified by:
getModifiedTime in interface SFTPFileAttributes

getPermissions

public int getPermissions()
Description copied from interface: SFTPFileAttributes
Get the current permissions value.

Specified by:
getPermissions in interface SFTPFileAttributes

getPermissionsString

public java.lang.String getPermissionsString()
Description copied from interface: SFTPFileAttributes
Returns a formatted permissions string.

Specified by:
getPermissionsString in interface SFTPFileAttributes

getSize

public long getSize()
Description copied from interface: SFTPFileAttributes
Get the size of the file.

Specified by:
getSize in interface SFTPFileAttributes

getType

public int getType()
Description copied from interface: SFTPFileAttributes
the type of the entry: public static final int SSH_FILEXFER_TYPE_DIRECTORY=2; public static final int SSH_FILEXFER_TYPE_REGULAR=1; public static final int SSH_FILEXFER_TYPE_SPECIAL=4; public static final int SSH_FILEXFER_TYPE_SYMLINK=3; public static final int SSH_FILEXFER_TYPE_UNKNOWN=5;

Specified by:
getType in interface SFTPFileAttributes

getUID

public java.lang.String getUID()
Description copied from interface: SFTPFileAttributes
Get the UID of the owner.

Specified by:
getUID in interface SFTPFileAttributes

isBlock

public boolean isBlock()
Description copied from interface: SFTPFileAttributes
Determine whether these attributes refer to a block special file.

Specified by:
isBlock in interface SFTPFileAttributes

isCharacter

public boolean isCharacter()
Description copied from interface: SFTPFileAttributes
Determine whether these attributes refer to a character device.

Specified by:
isCharacter in interface SFTPFileAttributes

isDirectory

public boolean isDirectory()
Description copied from interface: SFTPFileAttributes
Determine whether these attributes refer to a directory

Specified by:
isDirectory in interface SFTPFileAttributes

isFifo

public boolean isFifo()
Description copied from interface: SFTPFileAttributes
Determine whether these attributes refer to a pipe.

Specified by:
isFifo in interface SFTPFileAttributes

isFile

public boolean isFile()
Description copied from interface: SFTPFileAttributes
Determine whether these attributes refer to a file.

Specified by:
isFile in interface SFTPFileAttributes

isFlagSet

public boolean isFlagSet(int flag)
Description copied from interface: SFTPFileAttributes
Determine if a permissions flag is set.

Specified by:
isFlagSet in interface SFTPFileAttributes

isLink

public boolean isLink()
Description copied from interface: SFTPFileAttributes
Determine whether these attributes refer to a symbolic link.

Specified by:
isLink in interface SFTPFileAttributes

isSocket

public boolean isSocket()
Description copied from interface: SFTPFileAttributes
Determine whether these attributes refer to a socket.

Specified by:
isSocket in interface SFTPFileAttributes

Sun Adapter for Batch/FTP