public abstract class DelegateDirectory extends Object implements IDirectory
Constructor and Description |
---|
DelegateDirectory(IFileSystem fs,
IDirectory delegate) |
Modifier and Type | Method and Description |
---|---|
void |
clearCaches() |
boolean |
create() |
boolean |
delete() |
IDirectory |
dir(String relativePath) |
boolean |
exists()
Indicates whether this resource exists.
|
IFile |
file(String path)
Constucts a file given the path.
|
IDirectory |
getDelegate() |
IFileSystem |
getFileSystem()
The file system supporting this resource
|
String |
getName()
Gets this file's or directory's name.
|
IDirectory |
getParent()
Gets this file's our directory's parent directory.
|
ResourcePath |
getPath() |
boolean |
hasChildFile(String path)
Returns true if the given path represents a child of this directory that exists.
|
boolean |
isChildOf(IDirectory dir)
Indicates whether this resource is a direct child of the given directory.
|
boolean |
isDescendantOf(IDirectory dir)
Indicates whether this resource is a descendant of the given directory.
|
boolean |
isInJar() |
boolean |
isJavaFile() |
List<? extends IDirectory> |
listDirs() |
List<? extends IFile> |
listFiles() |
boolean |
mkdir() |
String |
relativePath(IResource resource) |
File |
toJavaFile() |
URI |
toURI() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isAdditional
public DelegateDirectory(IFileSystem fs, IDirectory delegate)
public IFileSystem getFileSystem()
IResource
getFileSystem
in interface IResource
public IDirectory getDelegate()
public IDirectory dir(String relativePath)
dir
in interface IDirectory
public IFile file(String path)
IDirectory
file
in interface IDirectory
path
- the path of the filepublic boolean mkdir() throws IOException
mkdir
in interface IDirectory
IOException
public List<? extends IDirectory> listDirs()
listDirs
in interface IDirectory
public List<? extends IFile> listFiles()
listFiles
in interface IDirectory
public String relativePath(IResource resource)
relativePath
in interface IDirectory
public void clearCaches()
clearCaches
in interface IDirectory
public IDirectory getParent()
IResource
public String getName()
IResource
public boolean exists()
IResource
public boolean delete() throws IOException
delete
in interface IResource
IOException
public ResourcePath getPath()
public boolean isChildOf(IDirectory dir)
IResource
public boolean isDescendantOf(IDirectory dir)
IResource
isDescendantOf
in interface IResource
dir
- the directory which would be the ancestorpublic File toJavaFile()
toJavaFile
in interface IResource
public boolean isJavaFile()
isJavaFile
in interface IResource
public boolean hasChildFile(String path)
IDirectory
hasChildFile
in interface IDirectory
path
- the path of the fileCopyright © 2024. All rights reserved.