static class FileBrowser.LocalPath extends FileBrowser.MyPath
| Modifier and Type | Field and Description |
|---|---|
(package private) java.nio.file.WatchKey |
key |
(package private) java.nio.file.Path |
path |
(package private) static long |
serialVersionUID |
treeChildren, uri| Constructor and Description |
|---|
LocalPath(java.net.URI uri)
For linux: root directory ends in '/', no other LocalPath does
For windows: top-level drives /x:/ ends in '/', no other LocalPath does
NB: InvalidPathException.getIndex() returns an index to the
unescaped URI - all %xx count as one character.
|
| Modifier and Type | Method and Description |
|---|---|
(package private) boolean |
copyFileFrom(FileBrowser.MyPath file)
Copies a file to this.
|
(package private) boolean |
copyFileTo(FileBrowser.LocalPath toFile)
Copy this to toFile.
|
(package private) boolean |
copyFileTo(FileBrowser.RemotePath toFile)
Copy this to toFile.
|
(package private) boolean |
delete()
Deletes a file or a symbolic link
|
boolean |
equals(java.lang.Object other) |
(package private) boolean |
exists()
Checks if the path refers to an existing file or directory.
|
(package private) java.lang.String |
fullName()
Returns the full path of this path
|
(package private) java.util.TreeSet<FileBrowser.TableData> |
getChildren(boolean dotFiles)
Enumerates all children (files and directories) of this path.
|
(package private) java.awt.datatransfer.DataFlavor |
getFlavor()
Returns the appropriate transfer DataFlavor for this MyPath.
|
(package private) long |
getMTime()
Returns the modification date of this file as the number of
milliseconds after 00:00:00 GMT, January 1, 1970.
|
(package private) FileBrowser.MyPath |
getParent()
returns a path to the parent of this path or null if there is
no parent.
|
(package private) java.util.ArrayList<FileBrowser.MyPath> |
getTreeChildren()
Only gets directories
|
int |
hashCode() |
(package private) boolean |
isDirectory()
Checks if the path refers to a directory.
|
(package private) boolean |
isFile()
Checks if the path refers to an ordinary file.
|
(package private) boolean |
isLink()
Checks if the path refers to a link.
|
(package private) boolean |
makeDirectory()
creates an empty directory at the location specified by this.
|
(package private) boolean |
makeLinkTo(byte[] target)
Creates a symbolic link from this to target.
|
(package private) void |
moveFileFrom(FileBrowser.MyPath file)
Moves a file or directory from one directory to
another.
|
(package private) void |
moveFileTo(FileBrowser.LocalPath other)
Move this to other.
|
(package private) void |
moveFileTo(FileBrowser.RemotePath other)
Move this to other.
|
(package private) java.util.List<java.lang.String> |
readAllLines()
Reads lines from this file and returns them as a List<String>
|
(package private) void |
readFile(byte[] data)
Will fill data with read information.
|
(package private) byte[] |
readLink()
Reads the link value (not it's target)
|
(package private) boolean |
renameFile(java.lang.String newName)
Renames this file or directory, keeping it in the same parent
directory.
|
(package private) FileBrowser.LocalPath |
resolve(java.nio.file.Path other)
Appends other to the current path and returns it.
|
(package private) FileBrowser.LocalPath |
resolve(java.lang.String other)
Appends other to the current path and returns it.
|
(package private) 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) long |
size()
Returns the length of the file in bytes refered to by this
path.
|
java.lang.String |
toString()
Returns the base name of this path
|
(package private) void |
touch()
Will touch file or directory.
|
(package private) void |
writeFile(byte[] data)
Will write data to file starting at offset.
|
getIndexstatic final long serialVersionUID
java.nio.file.WatchKey key
java.nio.file.Path path
LocalPath(java.net.URI uri)
uri - the URI to be converted to a Pathjava.awt.datatransfer.DataFlavor getFlavor()
FileBrowser.MyPathgetFlavor in class FileBrowser.MyPathboolean exists()
FileBrowser.MyPathexists in class FileBrowser.MyPathboolean isDirectory()
FileBrowser.MyPathisDirectory in class FileBrowser.MyPathboolean isFile()
FileBrowser.MyPathisFile in class FileBrowser.MyPathboolean isLink()
FileBrowser.MyPathisLink in class FileBrowser.MyPathFileBrowser.MyPath getParent()
FileBrowser.MyPathgetParent in class FileBrowser.MyPathjava.util.TreeSet<FileBrowser.TableData> getChildren(boolean dotFiles)
FileBrowser.MyPathgetChildren in class FileBrowser.MyPathdotFiles - true if dot files are to be includedjava.util.ArrayList<FileBrowser.MyPath> getTreeChildren()
getTreeChildren in class FileBrowser.MyPathFileBrowser.LocalPath resolve(java.lang.String other)
FileBrowser.MyPathresolve in class FileBrowser.MyPathother - the name to append to this pathFileBrowser.LocalPath resolve(java.nio.file.Path other)
FileBrowser.MyPathresolve in class FileBrowser.MyPathother - the name to append to this pathlong size()
FileBrowser.MyPathsize in class FileBrowser.MyPathlong getMTime()
FileBrowser.MyPathgetMTime in class FileBrowser.MyPathboolean setMTime(long time)
FileBrowser.MyPathsetMTime in class FileBrowser.MyPathtime - Number of milliseconds after 00:00:00 GMT, January 1, 1970boolean makeDirectory()
FileBrowser.MyPathmakeDirectory in class FileBrowser.MyPathboolean renameFile(java.lang.String newName)
FileBrowser.MyPathrenameFile in class FileBrowser.MyPathnewName - the new name of the file or directoryvoid readFile(byte[] data)
FileBrowser.MyPathreadFile in class FileBrowser.MyPathdata - buffer to read data intovoid writeFile(byte[] data)
FileBrowser.MyPathwriteFile in class FileBrowser.MyPathdata - buffer to write data fromjava.util.List<java.lang.String> readAllLines()
FileBrowser.MyPathreadAllLines in class FileBrowser.MyPathbyte[] readLink()
FileBrowser.MyPathreadLink in class FileBrowser.MyPathboolean makeLinkTo(byte[] target)
FileBrowser.MyPathmakeLinkTo in class FileBrowser.MyPathtarget - the target of the linkvoid touch()
FileBrowser.MyPathtouch in class FileBrowser.MyPathvoid moveFileFrom(FileBrowser.MyPath file)
FileBrowser.MyPathmoveFileFrom in class FileBrowser.MyPathfile - the file to be moved to thisvoid moveFileTo(FileBrowser.LocalPath other)
FileBrowser.MyPathmoveFileTo in class FileBrowser.MyPathother - directory to move this tovoid moveFileTo(FileBrowser.RemotePath other)
FileBrowser.MyPathmoveFileTo in class FileBrowser.MyPathother - directory to move this toboolean copyFileFrom(FileBrowser.MyPath file)
FileBrowser.MyPathcopyFileFrom in class FileBrowser.MyPathfile - the file to be copiedboolean copyFileTo(FileBrowser.LocalPath toFile)
FileBrowser.MyPathcopyFileTo in class FileBrowser.MyPathtoFile - LocalPath to copy this toboolean copyFileTo(FileBrowser.RemotePath toFile)
FileBrowser.MyPathcopyFileTo in class FileBrowser.MyPathtoFile - RemotePath to copy this toboolean delete()
FileBrowser.MyPathdelete in class FileBrowser.MyPathpublic java.lang.String toString()
FileBrowser.MyPathtoString in class FileBrowser.MyPathjava.lang.String fullName()
FileBrowser.MyPathfullName in class FileBrowser.MyPathpublic boolean equals(java.lang.Object other)
equals in class FileBrowser.MyPathpublic int hashCode()
hashCode in class FileBrowser.MyPath