Package org.savantbuild.io
Class FileInfo
java.lang.Object
org.savantbuild.io.FileInfo
- All Implemented Interfaces:
Comparable<FileInfo>
The information about a file that is collected from a FileSet. This includes the origin Path (which might be absolute
or relative to the directory of a FileSet) and a relative path (to the FileSet directory). This might also include
other file attributes that are part of the calculation including mode, ownership, etc.
-
Field Summary
FieldsModifier and TypeFieldDescription -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
creationTime
-
groupName
-
lastAccessTime
-
lastModifiedTime
-
origin
-
permissions
-
relative
-
size
-
userName
-
-
Constructor Details
-
FileInfo
-
-
Method Details
-
compareTo
- Specified by:
compareToin interfaceComparable<FileInfo>
-
equals
-
hashCode
public int hashCode() -
toMode
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.
- Returns:
- The POSIX mode bit map as an integer.
-