public abstract class AbstractFileTreeElement extends Object implements FileTreeElement
| Constructor and Description |
|---|
AbstractFileTreeElement() |
| 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.
|
abstract String |
getDisplayName() |
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.
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetFile, getLastModified, getRelativePath, getSize, isDirectory, openpublic abstract String getDisplayName()
public String getName()
FileTreeElementgetName in interface FileTreeElementpublic String getPath()
FileTreeElementgetRelativePath().getPathString().getPath in interface FileTreeElementpublic void copyTo(OutputStream outstr)
FileTreeElementnew FileInputStream(getFile()).copyTo in interface FileTreeElementoutstr - The output stream to write to. The caller is responsible for closing this stream.public boolean copyTo(File target)
FileTreeElementcopyTo in interface FileTreeElementtarget - the target file.public int getMode()
FileTreeElement0644.getMode in interface FileTreeElementCopyright © 2013. All rights reserved