public class FsDirectoryPath extends AbstractDirectoryPath implements DirectoryPath, FsItem
This DirectoryPath
representes a directory on the path system.
Constructor and Description |
---|
FsDirectoryPath(File file,
DirectoryPath parent)
Builds a new instance.
|
FsDirectoryPath(String path,
DirectoryPath parent)
Builds a new instance.
|
Modifier and Type | Method and Description |
---|---|
protected Path |
buildChild(String child)
Builds the path corresponding to the given direct child name of this directory.
|
File |
getFile()
Gets the file object.
|
long |
getLastUpdate()
Gets the last update date of this path.
|
String[] |
list()
Lists all the children path names of this directory.
|
getChild
getAbsolutePath, getName, getParent, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getChild
getAbsolutePath, getName, getParent
public FsDirectoryPath(File file, DirectoryPath parent)
Builds a new instance. Throws a IllegalArgumentException
if the specified path does not represents a
directory on the path system.
file
- the directoryparent
- the parent, null
if this path is a rootpublic FsDirectoryPath(String path, DirectoryPath parent)
Builds a new instance. Throws a IllegalArgumentException
if the specified path does not represents a
directory on the path system.
path
- the directoryparent
- the parent, null
if this path is a rootprotected Path buildChild(String child) throws IOException
Builds the path corresponding to the given direct child name of this directory.
buildChild
in class AbstractDirectoryPath
child
- the child nameIOException
- if any I/O error occurspublic String[] list() throws IOException
Lists all the children path names of this directory.
list
in interface DirectoryPath
IOException
- if any I/O error occurspublic long getLastUpdate()
Gets the last update date of this path.
getLastUpdate
in interface Path
Copyright © 2012-2015. All Rights Reserved.