public class SftpFile
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
TYPE_BLOCK
File is a of block special device type
|
static int |
TYPE_CHARACTER
File is a of character special device type
|
static int |
TYPE_DIRECTORY
File is a of Directory type
|
static int |
TYPE_FIFO
File is a of FIFO type
|
static int |
TYPE_FILE
File is a of File type
|
static int |
TYPE_LINK
File is a of Symbolic Link type
|
static int |
TYPE_SOCKET
File is a of socket type
|
static int |
TYPE_UNKNOWN
File is a of an unknown type.
|
static char[] |
TYPES
Type mnemonics (match those returned by 'ls' command)
|
| Constructor and Description |
|---|
SftpFile(int type,
java.lang.String path,
long size,
long lastModified,
long created,
long accessed,
int gid,
int uid,
int permissions)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
long |
getAccessed()
Get the time in milliseconds the file was last accessed.
|
long |
getCreated()
Get the time in milliseconds the file was created.
|
int |
getGID()
Get the group ID (GID).
|
long |
getLastModified()
Get the time this file was last modified in milliseconds since the epoch,
or when it was created if it has not yet.
|
java.lang.String |
getName()
Get the base name of this file (i.e.
|
java.lang.String |
getPath()
Get the absolute path of this file.
|
int |
getPermissions()
Get the permissions value.
|
long |
getSize()
Get the size of this file in bytes.
|
int |
getType()
Get the type of file.
|
int |
getUID()
Get the user ID (UID)
|
boolean |
isDirectory()
Convenience method to determine if the file is a directory.
|
boolean |
isFile()
Convenience method to determine if the file is a regular file.
|
boolean |
isLink()
Convenience method to determine if the file is a symbolic link.
|
java.lang.String |
toString() |
public static char[] TYPES
public static final int TYPE_FILE
getType(),
Constant Field Valuespublic static final int TYPE_DIRECTORY
getType(),
Constant Field Valuespublic static final int TYPE_LINK
getType(),
Constant Field Valuespublic static final int TYPE_FIFO
getType(),
Constant Field Valuespublic static final int TYPE_UNKNOWN
getType(),
Constant Field Valuespublic static final int TYPE_SOCKET
getType(),
Constant Field Valuespublic static final int TYPE_CHARACTER
getType(),
Constant Field Valuespublic static final int TYPE_BLOCK
getType(),
Constant Field Valuespublic SftpFile(int type,
java.lang.String path,
long size,
long lastModified,
long created,
long accessed,
int gid,
int uid,
int permissions)
type - see getType()path - full path to the filesize - size of filelastModified - time in milliseconds since epoch file was last
modifiedcreated - time in milliseconds the file was createdaccessed - time in milliseconds the file was last accessedgid - the groud IDuid - the user IDpermissions - permissionspublic boolean isDirectory()
public boolean isFile()
public boolean isLink()
public int getType()
TYPE_FILE,
TYPE_DIRECTORY, TYPE_LINK, TYPE_UNKNOWN,
TYPE_FIFO, TYPE_CHARACTER, TYPE_BLOCK or
TYPE_LINK.public java.lang.String getPath()
public java.lang.String getName()
public long getSize()
public long getLastModified()
public java.lang.String toString()
toString in class java.lang.Objectpublic int getGID()
public int getUID()
public long getAccessed()
public long getCreated()
public int getPermissions()
Copyright © 2018. All rights reserved.