|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.maverick.sftp.SftpFileAttributes
This class represents the ATTRS structure defined in the draft-ietf-secsh-filexfer-02.txt which is used by the protocol to store file attribute information.
Field Summary | |
static int |
S_IFBLK
Permissions flag: Identifies the file as a block special file |
static int |
S_IFCHR
Permissions flag: Identifies the file as a character device |
static int |
S_IFDIR
Permissions flag: Identifies the file as a directory |
static int |
S_IFIFO
Permissions flag: Identifies the file as a pipe |
static int |
S_IFLNK
Permissions flag: Identifies the file as a symbolic link |
static int |
S_IFMT
Permissions flag: Format mask constant can be used to mask off a file type from the mode. |
static int |
S_IFREG
Permissions flag: Identifies the file as a regular file |
static int |
S_IFSOCK
Permissions flag: Identifies the file as a socket |
static int |
S_IRGRP
Permissions flag: Permits a file's group to read the file. |
static int |
S_IROTH
Permissions flag: Permits others to read the file. |
static int |
S_IRUSR
Permissions flag: Permits the owner of a file to read the file. |
static int |
S_ISGID
Permissions flag: Bit to determine whether a file is executed as the group owner |
static int |
S_ISUID
Permissions flag: Bit to determine whether a file is executed as the owner |
static int |
S_IWGRP
Permissions flag: Permits a file's group to write to the file. |
static int |
S_IWOTH
Permissions flag: Permits others to write to the file. |
static int |
S_IWUSR
Permissions flag: Permits the owner of a file to write to the file. |
static int |
S_IXGRP
Permissions flag: Permits a file's group to execute the file or to search the file's directory. |
static int |
S_IXOTH
Permissions flag: Permits others to execute the file or to search the file's directory. |
static int |
S_IXUSR
Permissions flag: Permits the owner of a file to execute the file or to search the file's directory. |
static int |
SSH_FILEXFER_TYPE_DIRECTORY
|
static int |
SSH_FILEXFER_TYPE_REGULAR
|
static int |
SSH_FILEXFER_TYPE_SPECIAL
|
static int |
SSH_FILEXFER_TYPE_SYMLINK
|
static int |
SSH_FILEXFER_TYPE_UNKNOWN
|
Constructor Summary | |
SftpFileAttributes(SftpSubsystemChannel sftp,
com.maverick.crypto.io.ByteArrayReader bar)
|
|
SftpFileAttributes(SftpSubsystemChannel sftp,
int type)
Creates a new FileAttributes object. |
Method Summary | |
com.maverick.crypto.io.UnsignedInteger64 |
getAccessedTime()
Get the last accessed time. |
com.maverick.crypto.io.UnsignedInteger64 |
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 |
com.maverick.crypto.io.UnsignedInteger64 |
getModifiedTime()
Get the last modified time. |
com.maverick.crypto.io.UnsignedInteger32 |
getPermissions()
Get the current permissions value. |
java.lang.String |
getPermissionsString()
Returns a formatted permissions string. |
com.maverick.crypto.io.UnsignedInteger64 |
getSize()
Get the size of the file. |
int |
getType()
|
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. |
void |
setGID(java.lang.String gid)
Set the GID of this file. |
void |
setPermissions(java.lang.String newPermissions)
Set the permissions from a string in the format "rwxr-xr-x" |
void |
setPermissions(com.maverick.crypto.io.UnsignedInteger32 permissions)
Set the permissions of the file. |
void |
setPermissionsFromMaskString(java.lang.String mask)
Set permissions given a UNIX style mask, for example '0644' |
void |
setPermissionsFromUmaskString(java.lang.String umask)
Set the permissions given a UNIX style umask, for example '0022' will result in 0022 ^ 0777. |
void |
setSize(com.maverick.crypto.io.UnsignedInteger64 size)
Set the size of the file. |
void |
setTimes(com.maverick.crypto.io.UnsignedInteger64 atime,
com.maverick.crypto.io.UnsignedInteger64 mtime)
Set the last access and last modified times. |
void |
setUID(java.lang.String uid)
Set the UID of the owner. |
byte[] |
toByteArray()
Returns a formatted byte array suitable for encoding into SFTP subsystem messages. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int SSH_FILEXFER_TYPE_REGULAR
public static final int SSH_FILEXFER_TYPE_DIRECTORY
public static final int SSH_FILEXFER_TYPE_SYMLINK
public static final int SSH_FILEXFER_TYPE_SPECIAL
public static final int SSH_FILEXFER_TYPE_UNKNOWN
public static final int S_IFMT
public static final int S_IFSOCK
public static final int S_IFLNK
public static final int S_IFREG
public static final int S_IFBLK
public static final int S_IFDIR
public static final int S_IFCHR
public static final int S_IFIFO
public static final int S_ISUID
public static final int S_ISGID
public static final int S_IRUSR
public static final int S_IWUSR
public static final int S_IXUSR
public static final int S_IRGRP
public static final int S_IWGRP
public static final int S_IXGRP
public static final int S_IROTH
public static final int S_IWOTH
public static final int S_IXOTH
Constructor Detail |
public SftpFileAttributes(SftpSubsystemChannel sftp, int type)
public SftpFileAttributes(SftpSubsystemChannel sftp, com.maverick.crypto.io.ByteArrayReader bar) throws java.io.IOException
Method Detail |
public int getType()
public java.lang.String getUID()
public void setUID(java.lang.String uid)
uid
- public void setGID(java.lang.String gid)
gid
- public java.lang.String getGID()
public void setSize(com.maverick.crypto.io.UnsignedInteger64 size)
size
- public com.maverick.crypto.io.UnsignedInteger64 getSize()
public void setPermissions(com.maverick.crypto.io.UnsignedInteger32 permissions)
public void setPermissionsFromMaskString(java.lang.String mask)
mask
- mask
java.lang.IllegalArgumentException
- if badly formatted stringpublic void setPermissionsFromUmaskString(java.lang.String umask)
umask
- public void setPermissions(java.lang.String newPermissions)
newPermissions
- public com.maverick.crypto.io.UnsignedInteger32 getPermissions()
public void setTimes(com.maverick.crypto.io.UnsignedInteger64 atime, com.maverick.crypto.io.UnsignedInteger64 mtime)
atime
- mtime
- public com.maverick.crypto.io.UnsignedInteger64 getAccessedTime()
public com.maverick.crypto.io.UnsignedInteger64 getModifiedTime()
public com.maverick.crypto.io.UnsignedInteger64 getCreationTime()
public boolean isFlagSet(int flag)
flag
-
public byte[] toByteArray() throws java.io.IOException
java.io.IOException
public java.lang.String getPermissionsString()
public java.lang.String getMaskString()
public boolean isDirectory()
public boolean isFile()
public boolean isLink()
public boolean isFifo()
public boolean isBlock()
public boolean isCharacter()
public boolean isSocket()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |