Package org.qdl_lang.vfs
Class VFSZipFileProvider
- java.lang.Object
-
- org.qdl_lang.vfs.AbstractVFSFileProvider
-
- org.qdl_lang.vfs.VFSZipFileProvider
-
- All Implemented Interfaces:
Serializable
,VFSFileProvider
public class VFSZipFileProvider extends AbstractVFSFileProvider
This is experimental. Part of the issue is that the file has to be read in one go (can be quite time consuming) and stashed then managed. This means making a virtual file system and managing it potentially. Need to think about how to do this more efficiently. It is not practical to mount zip file sin any other than read only mode for now since the Java classes that manage this require the entire file get re-written for any changes.Created by Jeff Gaynor
on 3/5/20 at 7:36 AM- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VFSZipFileProvider.MapZipEntry
-
Constructor Summary
Constructors Constructor Description VFSZipFileProvider(String pathToZip, String scheme, String mountPoint, boolean canRead, boolean canWrite)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canWrite()
Zip files are not writeable.boolean
contains(String path)
Contains is a type of read.String[]
dir(String path)
VFSEntry
get(String path, int type)
Get the named item.String
getType()
mostly this is so when information is being displayed to the user they can see the origin of the provider.protected Path
getZipPath(String path)
protected void
init()
-
Methods inherited from class org.qdl_lang.vfs.AbstractVFSFileProvider
canRead, checkPath, checkScheme, delete, easSupported, getCurrentDir, getFileInfo, getMountPoint, getRealPath, getScheme, getStoreRoot, isAbsolute, isChildOf, isDirectory, isScript, length, mkdir, put, put, rm, rmdir, setCurrentDir, setMountPoint, setRead, setScheme, setWrite, unqualifyPath
-
-
-
-
Method Detail
-
getType
public String getType()
Description copied from interface:VFSFileProvider
mostly this is so when information is being displayed to the user they can see the origin of the provider.- Returns:
-
init
protected void init()
-
get
public VFSEntry get(String path, int type) throws Throwable
Description copied from interface:VFSFileProvider
Get the named item. Note that all of the names are qualified.- Specified by:
get
in interfaceVFSFileProvider
- Overrides:
get
in classAbstractVFSFileProvider
- Returns:
- Throws:
Throwable
-
contains
public boolean contains(String path) throws Throwable
Description copied from interface:VFSFileProvider
Contains is a type of read. If the store is not readable, it cannot tell if it contains an entry.- Specified by:
contains
in interfaceVFSFileProvider
- Overrides:
contains
in classAbstractVFSFileProvider
- Returns:
- Throws:
Throwable
-
dir
public String[] dir(String path) throws Throwable
- Specified by:
dir
in interfaceVFSFileProvider
- Overrides:
dir
in classAbstractVFSFileProvider
- Throws:
Throwable
-
canWrite
public boolean canWrite()
Zip files are not writeable.- Specified by:
canWrite
in interfaceVFSFileProvider
- Overrides:
canWrite
in classAbstractVFSFileProvider
- Returns:
-
-