public class SshFileAttributes extends java.lang.Object implements FileAttributes
Modifier and Type | Field and Description |
---|---|
private com.jcraft.jsch.SftpATTRS |
attributes |
private static int |
MILLISECONDS_PER_SECOND
Number of millisecond per second seems to be 1000
|
private Path |
path |
static int |
SGID
Bit set to set group ID on execution
|
static int |
SUID
Bit set to set user ID on execution
|
static int |
SVTX
Bit set to set sticky bit ****** NOT DOCUMENTED
|
Constructor and Description |
---|
SshFileAttributes(com.jcraft.jsch.SftpATTRS attributes,
Path path) |
Modifier and Type | Method and Description |
---|---|
long |
creationTime()
Get the creation time for this file.
|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
group()
Get the group of this file.
|
int |
hashCode() |
boolean |
isDirectory()
Does the path refer to a directory ?
|
boolean |
isExecutable()
Does the path refer to an executable file ?
|
boolean |
isHidden()
Does the path refer to an hidden file ?
|
boolean |
isOther()
Is the path not a file, link or directory ?
|
boolean |
isReadable()
Does the path refer to an readable file ?
|
boolean |
isRegularFile()
Does the path refer to a regular file ?
|
boolean |
isSymbolicLink()
Does the path refer to a symbolic link ?
|
boolean |
isWritable()
Does the path refer to a writable file ?
|
long |
lastAccessTime()
Get the last access time for this file.
|
long |
lastModifiedTime()
Get the last modified time for this file.
|
java.lang.String |
owner()
Get the owner of this file.
|
java.util.Set<PosixFilePermission> |
permissions()
Get the permissions of this file.
|
long |
size()
Get the size of this file.
|
java.lang.String |
toString() |
private static final int MILLISECONDS_PER_SECOND
public static final int SUID
public static final int SGID
public static final int SVTX
private final com.jcraft.jsch.SftpATTRS attributes
private final Path path
public SshFileAttributes(com.jcraft.jsch.SftpATTRS attributes, Path path)
public boolean isDirectory()
FileAttributes
isDirectory
in interface FileAttributes
public boolean isOther()
FileAttributes
isOther
in interface FileAttributes
public boolean isRegularFile()
FileAttributes
isRegularFile
in interface FileAttributes
public boolean isSymbolicLink()
FileAttributes
isSymbolicLink
in interface FileAttributes
public long creationTime()
FileAttributes
FileAttributes.lastModifiedTime()
will be returned instead.creationTime
in interface FileAttributes
public long lastAccessTime()
FileAttributes
FileAttributes.lastModifiedTime()
will be returned instead.lastAccessTime
in interface FileAttributes
public long lastModifiedTime()
FileAttributes
0
will be returned instead.lastModifiedTime
in interface FileAttributes
public long size()
FileAttributes
0
will be returned.size
in interface FileAttributes
public java.lang.String group()
FileAttributes
group
in interface FileAttributes
public java.lang.String owner()
FileAttributes
owner
in interface FileAttributes
public java.util.Set<PosixFilePermission> permissions()
FileAttributes
permissions
in interface FileAttributes
public boolean isExecutable()
FileAttributes
isExecutable
in interface FileAttributes
public boolean isHidden()
FileAttributes
isHidden
in interface FileAttributes
public boolean isReadable()
FileAttributes
isReadable
in interface FileAttributes
public boolean isWritable()
FileAttributes
isWritable
in interface FileAttributes
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object