public class EmptyTree<T extends ContentMeta> extends StringToPathTree<T>
Constructor and Description |
---|
EmptyTree() |
Modifier and Type | Method and Description |
---|---|
Resource<T> |
createResource(Path path,
T content)
Create a resource
|
boolean |
deleteResource(Path path)
Delete a resource at a path
|
Resource<T> |
getPath(Path path)
Return the resource or directory at the path
|
Resource<T> |
getResource(Path path)
Return the resource at the path
|
boolean |
hasDirectory(Path path)
Return true if a directory at the path exists
|
boolean |
hasPath(Path path)
Return true if the path exists
|
boolean |
hasResource(Path path)
Return true if a resource at the path exists
|
java.util.Set<Resource<T>> |
listDirectory(Path path)
Return the set of resources at the directory path
|
java.util.Set<Resource<T>> |
listDirectoryResources(Path path)
Return the set of non-directory resources at the directory path
|
java.util.Set<Resource<T>> |
listDirectorySubdirs(Path path)
Return the set of sub directory resources within the directory path
|
Resource<T> |
updateResource(Path path,
T content)
Update an existing resource
|
createResource, deleteResource, getPath, getResource, hasDirectory, hasPath, hasResource, listDirectory, listDirectoryResources, listDirectorySubdirs, updateResource
public boolean hasPath(Path path)
Tree
path
- pathpublic boolean hasResource(Path path)
Tree
path
- pathpublic boolean hasDirectory(Path path)
Tree
path
- pathpublic Resource<T> getPath(Path path)
Tree
path
- pathpublic Resource<T> getResource(Path path)
Tree
path
- pathpublic java.util.Set<Resource<T>> listDirectoryResources(Path path)
Tree
path
- pathpublic java.util.Set<Resource<T>> listDirectory(Path path)
Tree
path
- pathpublic java.util.Set<Resource<T>> listDirectorySubdirs(Path path)
Tree
path
- directory pathpublic boolean deleteResource(Path path)
Tree
path
- pathpublic Resource<T> createResource(Path path, T content)
Tree
path
- pathcontent
- resource content