Package org.qdl_lang.vfs
Class VFSMemoryDirectoryEntry
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap<String,VFSMetaEntry>
-
- org.qdl_lang.vfs.VFSMemoryDirectoryEntry
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<String,VFSMetaEntry>
,VFSMetaEntry
public class VFSMemoryDirectoryEntry extends HashMap<String,VFSMetaEntry> implements VFSMetaEntry
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object,V extends Object>
-
-
Constructor Summary
Constructors Constructor Description VFSMemoryDirectoryEntry()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description VFSMetaEntry
getEntry(String relativePath)
Takes a relative path, e.g.String
getName()
boolean
isDirectory()
boolean
isDirectory(String relativePath)
void
mkdirs(String relativePath)
VFSMetaEntry
putEntry(String relativePath, VFSMetaEntry value)
void
rm(String relativePath)
Removes the file from the storevoid
rmDirectory(String relativePath)
Contract is if the relative path has multiple components, remove the last one.void
setName(String name)
-
Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
-
-
-
-
Method Detail
-
isDirectory
public boolean isDirectory()
- Specified by:
isDirectory
in interfaceVFSMetaEntry
-
getName
public String getName()
-
setName
public void setName(String name)
-
getEntry
public VFSMetaEntry getEntry(String relativePath)
Takes a relative path, e.g. a/b/c/foo.txt and returns the entry or if the entry is a directory, returns that.- Parameters:
relativePath
-- Returns:
-
putEntry
public VFSMetaEntry putEntry(String relativePath, VFSMetaEntry value)
-
mkdirs
public void mkdirs(String relativePath)
-
isDirectory
public boolean isDirectory(String relativePath)
-
rm
public void rm(String relativePath)
Removes the file from the store- Parameters:
relativePath
-
-
rmDirectory
public void rmDirectory(String relativePath)
Contract is if the relative path has multiple components, remove the last one.- Parameters:
relativePath
-
-
-