abstract static class FileBrowser.MyPath extends java.lang.Object implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
(package private) static long |
serialVersionUID |
protected java.util.ArrayList<FileBrowser.MyPath> |
treeChildren |
(package private) java.net.URI |
uri |
Constructor and Description |
---|
MyPath() |
Modifier and Type | Method and Description |
---|---|
(package private) abstract boolean |
copyFileFrom(FileBrowser.MyPath file)
Copies a file to this.
|
(package private) abstract boolean |
copyFileTo(FileBrowser.LocalPath toFile)
Copy this to toFile.
|
(package private) abstract boolean |
copyFileTo(FileBrowser.RemotePath toFile)
Copy this to toFile.
|
(package private) abstract boolean |
delete()
Deletes a file or a symbolic link
|
abstract boolean |
equals(java.lang.Object other) |
(package private) abstract boolean |
exists()
Checks if the path refers to an existing file or directory.
|
(package private) abstract java.lang.String |
fullName()
Returns the full path of this path
|
(package private) abstract java.util.TreeSet<FileBrowser.TableData> |
getChildren(boolean dotFiles)
Enumerates all children (files and directories) of this path.
|
(package private) abstract java.awt.datatransfer.DataFlavor |
getFlavor()
Returns the appropriate transfer DataFlavor for this MyPath.
|
(package private) int |
getIndex(FileBrowser.MyPath child)
Gets the index of child in children or -1 if not found.
|
(package private) abstract long |
getMTime()
Returns the modification date of this file as the number of
milliseconds after 00:00:00 GMT, January 1, 1970.
|
(package private) abstract FileBrowser.MyPath |
getParent()
returns a path to the parent of this path or null if there is
no parent.
|
(package private) abstract java.util.ArrayList<FileBrowser.MyPath> |
getTreeChildren()
Gets the exposed directory children of this path.
|
abstract int |
hashCode() |
(package private) abstract boolean |
isDirectory()
Checks if the path refers to a directory.
|
(package private) abstract boolean |
isFile()
Checks if the path refers to an ordinary file.
|
(package private) abstract boolean |
isLink()
Checks if the path refers to a link.
|
(package private) abstract boolean |
makeDirectory()
creates an empty directory at the location specified by this.
|
(package private) abstract boolean |
makeLinkTo(byte[] target)
Creates a symbolic link from this to target.
|
(package private) abstract void |
moveFileFrom(FileBrowser.MyPath file)
Moves a file or directory from one directory to
another.
|
(package private) abstract void |
moveFileTo(FileBrowser.LocalPath other)
Move this to other.
|
(package private) abstract void |
moveFileTo(FileBrowser.RemotePath other)
Move this to other.
|
(package private) abstract java.util.List<java.lang.String> |
readAllLines()
Reads lines from this file and returns them as a List<String>
|
(package private) abstract void |
readFile(byte[] data)
Will fill data with read information.
|
(package private) abstract byte[] |
readLink()
Reads the link value (not it's target)
|
(package private) abstract boolean |
renameFile(java.lang.String newName)
Renames this file or directory, keeping it in the same parent
directory.
|
(package private) abstract FileBrowser.MyPath |
resolve(java.nio.file.Path other)
Appends other to the current path and returns it.
|
(package private) abstract FileBrowser.MyPath |
resolve(java.lang.String other)
Appends other to the current path and returns it.
|
(package private) abstract boolean |
setMTime(long time)
Sets the modification date of this file as the number of
milliseconds after 00:00:00 GMT, January 1, 1970.
|
(package private) abstract long |
size()
Returns the length of the file in bytes refered to by this
path.
|
abstract java.lang.String |
toString()
Returns the base name of this path
|
(package private) abstract void |
touch()
Will touch file or directory.
|
(package private) abstract void |
writeFile(byte[] data)
Will write data to file starting at offset.
|
static final long serialVersionUID
java.net.URI uri
protected transient java.util.ArrayList<FileBrowser.MyPath> treeChildren
MyPath()
abstract java.awt.datatransfer.DataFlavor getFlavor()
abstract boolean exists()
abstract boolean isDirectory()
abstract boolean isFile()
abstract boolean isLink()
abstract FileBrowser.MyPath getParent()
abstract java.util.ArrayList<FileBrowser.MyPath> getTreeChildren()
abstract java.util.TreeSet<FileBrowser.TableData> getChildren(boolean dotFiles)
dotFiles
- true if dot files are to be includedint getIndex(FileBrowser.MyPath child)
child
- the child to search forabstract FileBrowser.MyPath resolve(java.lang.String other)
other
- the name to append to this pathabstract FileBrowser.MyPath resolve(java.nio.file.Path other)
other
- the name to append to this pathabstract long size()
abstract long getMTime()
abstract boolean setMTime(long time)
time
- Number of milliseconds after 00:00:00 GMT, January 1, 1970abstract boolean makeDirectory()
abstract boolean renameFile(java.lang.String newName)
newName
- the new name of the file or directoryabstract void readFile(byte[] data)
data
- buffer to read data intoabstract void writeFile(byte[] data)
data
- buffer to write data fromabstract java.util.List<java.lang.String> readAllLines()
abstract byte[] readLink()
abstract boolean makeLinkTo(byte[] target)
target
- the target of the linkabstract void touch()
abstract void moveFileFrom(FileBrowser.MyPath file)
file
- the file to be moved to thisabstract void moveFileTo(FileBrowser.LocalPath other)
other
- directory to move this toabstract void moveFileTo(FileBrowser.RemotePath other)
other
- directory to move this toabstract boolean copyFileFrom(FileBrowser.MyPath file)
file
- the file to be copiedabstract boolean copyFileTo(FileBrowser.LocalPath toFile)
toFile
- LocalPath to copy this toabstract boolean copyFileTo(FileBrowser.RemotePath toFile)
toFile
- RemotePath to copy this toabstract boolean delete()
public abstract java.lang.String toString()
toString
in class java.lang.Object
abstract java.lang.String fullName()
public abstract boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public abstract int hashCode()
hashCode
in class java.lang.Object