public final class LocalFileAttributes extends Object
Instances of this class are not safe for use by multiple threads.
| Constructor and Description |
|---|
LocalFileAttributes(String path)
Create a new local file attributes object.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
fileExists()
Answer whether the file exists.
|
File |
getFile()
Get the file.
|
String |
getPath()
Get the file path.
|
boolean |
isFile()
Answer whether the file is a normal (regular) file and not a directory, link or any other.
|
boolean |
isValid()
Answer whether this object contains valid values.
|
long |
lastModifiedInMillis()
Get the time stamp of the last file modification in milliseconds since 1.1.1970.
|
long |
lengthInBytes()
Get the current length of the file in bytes.
|
void |
refresh()
Refresh the content of this object.
|
public LocalFileAttributes(String path)
path - The file pathIllegalArgumentException - if the path is null or blankpublic final String getPath()
public final File getFile()
public final void refresh()
public final boolean isValid()
public final boolean fileExists()
public final long lengthInBytes()
public final long lastModifiedInMillis()
public final boolean isFile()
Copyright © 2019. All rights reserved.