public final class FileAttributes
extends java.lang.Object
FileSystemUtil.getAttributes(String)
Modifier and Type | Class and Description |
---|---|
static interface |
FileAttributes.Flags |
static class |
FileAttributes.Type |
Modifier and Type | Field and Description |
---|---|
static FileAttributes |
BROKEN_SYMLINK |
byte |
flags |
static byte |
HIDDEN |
long |
lastModified
In milliseconds (actual resolution depends on a file system and may be less accurate).
For symlinks - timestamp of a link target. |
long |
length
In bytes, 0 for special files.
For symlinks - length of a link target. |
static byte |
READ_ONLY |
static byte |
SYM_LINK |
FileAttributes.Type |
type
null means unknown type - typically broken symlink. |
Constructor and Description |
---|
FileAttributes(boolean directory,
boolean special,
boolean symlink,
boolean hidden,
long length,
long lastModified,
boolean writable) |
Modifier and Type | Method and Description |
---|---|
static FileAttributes |
createFrom(byte fileAttributesType,
byte flags,
long length,
long lastModified) |
boolean |
equals(java.lang.Object o) |
int |
hashCode() |
boolean |
isDirectory() |
boolean |
isFile() |
boolean |
isHidden() |
boolean |
isSpecial() |
boolean |
isSymLink() |
boolean |
isWritable() |
java.lang.String |
toString() |
public static final byte SYM_LINK
public static final byte HIDDEN
public static final byte READ_ONLY
public static final FileAttributes BROKEN_SYMLINK
public final FileAttributes.Type type
null
means unknown type - typically broken symlink.public final byte flags
public final long length
public final long lastModified
public FileAttributes(boolean directory, boolean special, boolean symlink, boolean hidden, long length, long lastModified, boolean writable)
public boolean isFile()
public boolean isDirectory()
public boolean isSpecial()
public boolean isSymLink()
public boolean isHidden()
public boolean isWritable()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public static FileAttributes createFrom(byte fileAttributesType, byte flags, long length, long lastModified)