public class JarFileDirectoryImpl extends Object implements IJarFileDirectory
Constructor and Description |
---|
JarFileDirectoryImpl(IFileSystem fileSystem,
File file) |
Modifier and Type | Method and Description |
---|---|
void |
clearCaches() |
boolean |
create() |
boolean |
delete() |
IDirectory |
dir(String relativePath) |
boolean |
equals(Object obj) |
boolean |
exists()
Indicates whether this resource exists.
|
IFile |
file(String path)
Constucts a file given the path.
|
IFileSystem |
getFileSystem()
The file system supporting this resource
|
InputStream |
getInputStream(JarEntry entry) |
JarFile |
getJarFile() |
String |
getName()
Gets this file's or directory's name.
|
JarEntryDirectoryImpl |
getOrCreateDirectory(String relativeName) |
JarEntryFileImpl |
getOrCreateFile(String relativeName) |
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 |
isAdditional() |
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() |
String |
toString() |
URI |
toURI() |
public JarFileDirectoryImpl(IFileSystem fileSystem, File file)
public IFileSystem getFileSystem()
IResource
getFileSystem
in interface IResource
public InputStream getInputStream(JarEntry entry) throws IOException
IOException
public JarEntryDirectoryImpl getOrCreateDirectory(String relativeName)
getOrCreateDirectory
in interface IJarFileDirectory
public JarEntryFileImpl getOrCreateFile(String relativeName)
getOrCreateFile
in interface IJarFileDirectory
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()
mkdir
in interface IDirectory
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 IDirectory getParent()
IResource
public String getName()
IResource
public boolean exists()
IResource
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 JarFile getJarFile()
public boolean isJavaFile()
isJavaFile
in interface IResource
public void clearCaches()
clearCaches
in interface IDirectory
public boolean hasChildFile(String path)
IDirectory
hasChildFile
in interface IDirectory
path
- the path of the filepublic boolean isAdditional()
isAdditional
in interface IDirectory
Copyright © 2024. All rights reserved.