public class DefaultFileTreeElement extends AbstractFileTreeElement
| Constructor and Description |
|---|
DefaultFileTreeElement(File file,
RelativePath relativePath) |
| Modifier and Type | Method and Description |
|---|---|
String |
getDisplayName() |
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.
|
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.
|
public DefaultFileTreeElement(File file, RelativePath relativePath)
public File getFile()
FileTreeElementpublic String getDisplayName()
getDisplayName in class AbstractFileTreeElementpublic long getLastModified()
FileTreeElementgetFile().lastModified()public long getSize()
FileTreeElementgetFile().length().public boolean isDirectory()
FileTreeElementpublic InputStream open()
FileTreeElementnew
FileInputStream(getFile()).public RelativePath getRelativePath()
FileTreeElementpublic int getMode()
FileTreeElement0644.getMode in interface FileTreeElementgetMode in class AbstractFileTreeElementCopyright © 2013. All rights reserved