Package org.qdl_lang.vfs
Class VFSMemoryFileProvider
- java.lang.Object
-
- org.qdl_lang.vfs.AbstractVFSFileProvider
-
- org.qdl_lang.vfs.VFSMemoryFileProvider
-
- All Implemented Interfaces:
Serializable,VFSFileProvider
public class VFSMemoryFileProvider extends AbstractVFSFileProvider
A VFS backed by a hash table. NOTE that the entries to this are the complete path. So creating a directory really has no effect.Created by Jeff Gaynor
on 3/4/20 at 11:31 AM- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description VFSMemoryFileProvider(String scheme, String mountPoint, boolean canRead, boolean canWrite)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontains(String path)Contains is a type of read.voiddelete(String path)A delete is a type of write.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.booleanisDirectory(String path)booleanmkdir(String path)Make a set of directories.String[]OLDdir(String path)voidput(String newPath, VFSEntry entry)Add the using the path.voidrm(String path)Remove a file from the store.booleanrmdir(String path)This will remove a directory.-
Methods inherited from class org.qdl_lang.vfs.AbstractVFSFileProvider
canRead, canWrite, checkPath, checkScheme, easSupported, getCurrentDir, getFileInfo, getMountPoint, getRealPath, getScheme, getStoreRoot, isAbsolute, isChildOf, isScript, length, put, 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:
-
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
-
put
public void put(String newPath, VFSEntry entry) throws Throwable
Description copied from interface:VFSFileProviderAdd the using the path. If and entry exists there it will be over-written.- Specified by:
putin interfaceVFSFileProvider- Overrides:
putin classAbstractVFSFileProvider- Throws:
Throwable
-
delete
public void delete(String path) throws Throwable
Description copied from interface:VFSFileProviderA delete is a type of write. If the store is not writeable, it cannot delete files.- Specified by:
deletein interfaceVFSFileProvider- Overrides:
deletein classAbstractVFSFileProvider- 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
-
mkdir
public boolean mkdir(String path)
Description copied from interface:VFSFileProviderMake a set of directories. This will make a given directory and any intermediate directories.- Specified by:
mkdirin interfaceVFSFileProvider- Overrides:
mkdirin classAbstractVFSFileProvider- Returns:
-
rmdir
public boolean rmdir(String path) throws Throwable
Description copied from interface:VFSFileProviderThis will remove a directory. Note that this requires that the directory be empty of all files.- Specified by:
rmdirin interfaceVFSFileProvider- Overrides:
rmdirin classAbstractVFSFileProvider- Returns:
- Throws:
Throwable
-
rm
public void rm(String path) throws Throwable
Description copied from interface:VFSFileProviderRemove a file from the store.- Specified by:
rmin interfaceVFSFileProvider- Overrides:
rmin classAbstractVFSFileProvider- Throws:
Throwable
-
isDirectory
public boolean isDirectory(String path)
- Specified by:
isDirectoryin interfaceVFSFileProvider- Overrides:
isDirectoryin classAbstractVFSFileProvider
-
-