Package gw.fs
Interface IDirectory
-
- All Superinterfaces:
IResource
- All Known Subinterfaces:
IJarFileDirectory
- All Known Implementing Classes:
AdditionalDirectory,DelegateDirectory,IncludeModuleDirectory,JarEntryDirectoryImpl,JarFileDirectoryImpl,JavaDirectoryImpl,PathDirectoryImpl,PhysicalDirectoryImpl
public interface IDirectory extends IResource
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclearCaches()IDirectorydir(java.lang.String relativePath)IFilefile(java.lang.String path)Constucts a file given the path.booleanhasChildFile(java.lang.String path)Returns true if the given path represents a child of this directory that exists.booleanisAdditional()java.util.List<? extends IDirectory>listDirs()java.util.List<? extends IFile>listFiles()booleanmkdir()java.lang.StringrelativePath(IResource resource)-
Methods inherited from interface gw.fs.IResource
create, delete, exists, getName, getParent, getPath, isChildOf, isDescendantOf, isInJar, isJavaFile, toJavaFile, toURI
-
-
-
-
Method Detail
-
dir
IDirectory dir(java.lang.String relativePath)
-
file
IFile file(java.lang.String path)
Constucts a file given the path. If the path is relative path, it will be constructed based on the current directory- Parameters:
path- the path of the file- Returns:
- The file that is under the directory with the name
-
mkdir
boolean mkdir() throws java.io.IOException- Throws:
java.io.IOException
-
listDirs
java.util.List<? extends IDirectory> listDirs()
-
listFiles
java.util.List<? extends IFile> listFiles()
-
relativePath
java.lang.String relativePath(IResource resource)
-
clearCaches
void clearCaches()
-
hasChildFile
boolean hasChildFile(java.lang.String path)
Returns true if the given path represents a child of this directory that exists. It's essentially equivalent to calling file(path).exists(), but in cases where this directory caches its list of children and the path represents a direct child of this directory, this method can be optimized to avoid file system access by looking in the list of cached children.- Parameters:
path- the path of the file- Returns:
- true if the path represents a file that exists as a child of this directory
-
isAdditional
boolean isAdditional()
- Returns:
- true if this is an "additional" path for resources not copied to the target classpath e.g., config bullshit.
-
-