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 classVFSZipFileProvider.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 booleancanWrite()Zip files are not writeable.booleancontains(String path)Contains is a type of read.String[]dir(String path)VFSEntryget(String path, int type)Get the named item.StringgetType()mostly this is so when information is being displayed to the user they can see the origin of the provider.protected PathgetZipPath(String path)protected voidinit()-
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:VFSFileProvidermostly 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:VFSFileProviderGet the named item. Note that all of the names are qualified.- Specified by:
getin interfaceVFSFileProvider- Overrides:
getin classAbstractVFSFileProvider- Returns:
- Throws:
Throwable
-
contains
public boolean contains(String path) throws Throwable
Description copied from interface:VFSFileProviderContains is a type of read. If the store is not readable, it cannot tell if it contains an entry.- Specified by:
containsin interfaceVFSFileProvider- Overrides:
containsin classAbstractVFSFileProvider- Returns:
- Throws:
Throwable
-
dir
public String[] dir(String path) throws Throwable
- Specified by:
dirin interfaceVFSFileProvider- Overrides:
dirin classAbstractVFSFileProvider- Throws:
Throwable
-
canWrite
public boolean canWrite()
Zip files are not writeable.- Specified by:
canWritein interfaceVFSFileProvider- Overrides:
canWritein classAbstractVFSFileProvider- Returns:
-
-