|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FileTreeElement
Information about a file in a FileTree
.
Method Summary | |
---|---|
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. |
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. |
Method Detail |
---|
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()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |