public interface FileMetaData
The meta data of a file or directory.
Modifier and Type | Method and Description |
---|---|
String |
getAbsolutePath()
Returns the absolute path consisting of the path and the name of the
file.
|
Date |
getLastModifiedDate()
Returns the timestamp of the last modification.
|
long |
getLength()
Returns the of the file in bytes.
|
FileMode |
getMode()
Returns the mode of the file.
|
String |
getModeAsText()
Returns the textual representation of the mode including the directory
flag.
|
String |
getName()
Returns the name of the file.
|
FileOwner |
getOwner()
Returns the owner of the file.
|
String |
getPath()
Returns the path of the file excluding the name.
|
String |
getTargetPath()
Returns the target path of the symbolic link.
|
boolean |
isDirectory()
Returns the flag if the file is a directory.
|
boolean |
isFile()
Returns the flag if the file is a regular file.
|
boolean |
isSymbolicLink()
Returns the flag if the file is a symbolic link.
|
String getPath()
Returns the path of the file excluding the name.
getName()
,
getAbsolutePath()
String getName()
Returns the name of the file.
getPath()
,
getAbsolutePath()
String getAbsolutePath()
Returns the absolute path consisting of the path and the name of the file.
If the file is a directory a trailing slash will be added.
boolean isFile()
Returns the flag if the file is a regular file.
A symbolic link is also a file.
true
, if the file is a regular file,
false
otherwise.isDirectory()
,
isSymbolicLink()
boolean isDirectory()
Returns the flag if the file is a directory.
true
, if the file is a directory,
false
otherwise.isFile()
boolean isSymbolicLink()
Returns the flag if the file is a symbolic link.
true
, if the file is a symbolic link,
false
otherwise.isFile()
,
getTargetPath()
String getTargetPath()
Returns the target path of the symbolic link.
null
, if this meta data does not
represent a symbolic link.isSymbolicLink()
FileOwner getOwner()
Returns the owner of the file.
FileMode getMode()
Returns the mode of the file.
String getModeAsText()
Returns the textual representation of the mode including the directory flag.
The returned value may look like this:
drwxrwxrwx
or like this:
----------
FileMode.getText()
long getLength()
Returns the of the file in bytes.
-1
, if the length is unknown or the
file is not a regular file.Date getLastModifiedDate()
Returns the timestamp of the last modification.
Copyright © 2015–2019. All rights reserved.