public class LocalFileAttributes extends java.lang.Object implements FileAttributes
FileAttributes
for local files.Modifier and Type | Field and Description |
---|---|
private long |
creationTime
The creation time of this file
|
private boolean |
executable
Is the file executable ?
|
private java.lang.String |
group
The group of this file
|
private boolean |
hidden
Is the file hidden ?
|
private boolean |
isDirectory
Is this a directory ?
|
private boolean |
isOther
Is this an other type of file ?
|
private boolean |
isRegular
Is this a regular file ?
|
private boolean |
isSymbolicLink
Is this a symbolic link ?
|
private boolean |
isWindows
Is this a windows file ?
|
private long |
lastAccessTime
The last access time of this file
|
private long |
lastModifiedTime
The last modified time of this file
|
private java.lang.String |
owner
The owner of this file
|
private java.util.Set<PosixFilePermission> |
permissions
The permissions of this file (POSIX only)
|
private boolean |
readable
Is the file readable ?
|
private long |
size
The size of this file
|
private boolean |
writable
Is the file writable ?
|
Constructor and Description |
---|
LocalFileAttributes(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 final boolean isDirectory
private final boolean isRegular
private final boolean isSymbolicLink
private final boolean isOther
private final boolean executable
private final boolean readable
private final boolean writable
private final boolean hidden
private final long creationTime
private final long lastAccessTime
private final long lastModifiedTime
private final long size
private final java.lang.String owner
private final java.lang.String group
private final java.util.Set<PosixFilePermission> permissions
private final boolean isWindows
public LocalFileAttributes(Path path) throws XenonException
XenonException
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() throws AttributeNotSupportedException
FileAttributes
group
in interface FileAttributes
AttributeNotSupportedException
- If the attribute is not supported by the adaptor.public java.lang.String owner() throws AttributeNotSupportedException
FileAttributes
owner
in interface FileAttributes
AttributeNotSupportedException
- If the attribute is not supported by the adaptor.public java.util.Set<PosixFilePermission> permissions() throws AttributeNotSupportedException
FileAttributes
permissions
in interface FileAttributes
AttributeNotSupportedException
- If the attribute is not supported by the adaptor.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 int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object