public class FileInfo extends java.lang.Object implements java.lang.Comparable<FileInfo>
Modifier and Type | Field and Description |
---|---|
java.nio.file.attribute.FileTime |
creationTime |
java.lang.String |
groupName |
java.nio.file.attribute.FileTime |
lastAccessTime |
java.nio.file.attribute.FileTime |
lastModifiedTime |
java.nio.file.Path |
origin |
java.util.Set<java.nio.file.attribute.PosixFilePermission> |
permissions |
java.nio.file.Path |
relative |
java.lang.Long |
size |
java.lang.String |
userName |
Constructor and Description |
---|
FileInfo(java.nio.file.Path origin,
java.nio.file.Path relative) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(FileInfo o) |
boolean |
equals(java.lang.Object o) |
int |
hashCode() |
int |
toMode()
Converts the file permissions of this FileInfo to a POSIX bit mapped mode.
|
public java.nio.file.attribute.FileTime creationTime
public java.lang.String groupName
public java.nio.file.attribute.FileTime lastAccessTime
public java.nio.file.attribute.FileTime lastModifiedTime
public java.nio.file.Path origin
public java.util.Set<java.nio.file.attribute.PosixFilePermission> permissions
public java.nio.file.Path relative
public java.lang.Long size
public java.lang.String userName
public int compareTo(FileInfo o)
compareTo
in interface java.lang.Comparable<FileInfo>
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public int toMode()
Converts the file permissions of this FileInfo to a POSIX bit mapped mode. The bit map looks like this:
1_000_000_001_000_000
The first bit is always set. The next three bits are the set UID bits, the next 3 bits are the set GID bits. The next three bits are the owner permissions (read, write, execute), then the group permissions and finally the user permissions.