Constructor and Description |
---|
FileInfoImpl(File file)
Creates a file information for the specified file.
|
Modifier and Type | Method and Description |
---|---|
boolean |
exists()
Returns the flag if the file exists.
|
String |
getAbsolutePath()
Returns the absolute path.
|
File |
getFile()
Returns the file.
|
long |
getLength()
Returns the length of the file in bytes.
|
boolean |
isDirectory()
Returns the flag if the file is a directory.
|
boolean |
isFile()
Returns the flag if the file is a regular file.
|
public FileInfoImpl(File file)
Creates a file information for the specified file.
file
- The file.IllegalArgumentException
- If the file is null
.public String getAbsolutePath()
FileInfo
Returns the absolute path.
getAbsolutePath
in interface FileInfo
public boolean exists()
FileInfo
Returns the flag if the file exists.
public boolean isFile()
FileInfo
Returns the flag if the file is a regular file.
public boolean isDirectory()
FileInfo
Returns the flag if the file is a directory.
isDirectory
in interface FileInfo
true
, if the file is a directory,
false
otherwise.Copyright © 2015–2019. All rights reserved.