public interface FileTreeElement
FileTree
.Modifier and Type | Method and Description |
---|---|
boolean |
copyTo(File target)
Copies this file to the given target file.
|
void |
copyTo(OutputStream outstr)
Copies the content of this file to an output stream.
|
File |
getFile()
Returns the file being visited.
|
long |
getLastModified()
Returns the last modified time of this file.
|
int |
getMode()
Returns the Unix permissions of this file, e.g.
|
String |
getName()
Returns the base name of this file.
|
String |
getPath()
Returns the path of this file, relative to the root of the containing file tree.
|
RelativePath |
getRelativePath()
Returns the path of this file, relative to the root of the containing file tree.
|
long |
getSize()
Returns the size of this file.
|
boolean |
isDirectory()
Returns true if this element is a directory, or false if this element is a regular file.
|
InputStream |
open()
Opens this file as an input stream.
|
File getFile()
boolean isDirectory()
long getLastModified()
getFile().lastModified()
long getSize()
getFile().length()
.InputStream open()
new
FileInputStream(getFile())
.void copyTo(OutputStream outstr)
new FileInputStream(getFile())
.outstr
- The output stream to write to. The caller is responsible for closing this stream.boolean copyTo(File target)
target
- the target file.String getName()
String getPath()
getRelativePath().getPathString()
.RelativePath getRelativePath()
int getMode()
0644
.