Class JarFileDirectoryImpl
java.lang.Object
manifold.api.fs.jar.JarFileDirectoryImpl
- All Implemented Interfaces:
IDirectory, IResource, IJarFileDirectory
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleancreate()booleandelete()booleanbooleanexists()Indicates whether this resource exists.Constucts a file given the path.The file system supporting this resourcegetInputStream(JarEntry entry) getName()Gets this file's or directory's name.getOrCreateDirectory(String relativeName) getOrCreateFile(String relativeName) Gets this file's our directory's parent directory.getPath()booleanhasChildFile(String path) Returns true if the given path represents a child of this directory that exists.booleanbooleanisChildOf(IDirectory dir) Indicates whether this resource is a direct child of the given directory.booleanisDescendantOf(IDirectory dir) Indicates whether this resource is a descendant of the given directory.booleanisInJar()booleanList<? extends IDirectory> listDirs()booleanmkdir()relativePath(IResource resource) toString()toURI()
-
Constructor Details
-
JarFileDirectoryImpl
-
-
Method Details
-
getFileSystem
Description copied from interface:IResourceThe file system supporting this resource- Specified by:
getFileSystemin interfaceIResource
-
getInputStream
- Throws:
IOException
-
getOrCreateDirectory
- Specified by:
getOrCreateDirectoryin interfaceIJarFileDirectory
-
getOrCreateFile
- Specified by:
getOrCreateFilein interfaceIJarFileDirectory
-
dir
- Specified by:
dirin interfaceIDirectory
-
file
Description copied from interface:IDirectoryConstucts a file given the path. If the path is relative path, it will be constructed based on the current directory- Specified by:
filein interfaceIDirectory- Parameters:
path- the path of the file- Returns:
- The file that is under the directory with the name
-
mkdir
public boolean mkdir()- Specified by:
mkdirin interfaceIDirectory
-
listDirs
- Specified by:
listDirsin interfaceIDirectory
-
listFiles
- Specified by:
listFilesin interfaceIDirectory
-
relativePath
- Specified by:
relativePathin interfaceIDirectory
-
getParent
Description copied from interface:IResourceGets this file's our directory's parent directory. -
getName
-
exists
-
delete
-
toURI
-
getPath
-
isChildOf
Description copied from interface:IResourceIndicates whether this resource is a direct child of the given directory. -
isDescendantOf
Description copied from interface:IResourceIndicates whether this resource is a descendant of the given directory.- Specified by:
isDescendantOfin interfaceIResource- Parameters:
dir- the directory which would be the ancestor- Returns:
- true if this is a descendant of the given directory
-
toJavaFile
- Specified by:
toJavaFilein interfaceIResource
-
getJarFile
-
isJavaFile
public boolean isJavaFile()- Specified by:
isJavaFilein interfaceIResource
-
isInJar
-
create
-
toString
-
equals
-
clearCaches
public void clearCaches()- Specified by:
clearCachesin interfaceIDirectory
-
hasChildFile
Description copied from interface:IDirectoryReturns 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.- Specified by:
hasChildFilein interfaceIDirectory- Parameters:
path- the path of the file- Returns:
- true if the path represents a file that exists as a child of this directory
-
isAdditional
public boolean isAdditional()- Specified by:
isAdditionalin interfaceIDirectory- Returns:
- true if this is an "additional" path for resources not copied to the target classpath e.g., config bullshit.
-