#include <ITree.h>
All paths follow unix convention .., ., /, backslash is the escape character. Relative paths are allowed.
NOTE: - this tree keeps a current position(pwd) within the tree. This may be implemented on a per-thread basis.
Definition at line 37 of file ITree.h.
Public Member Functions | |
virtual | ~ITree () |
Destructor. | |
virtual std::string | storeName () const =0 |
virtual IManagedObject * | find (const std::string &path)=0 |
virtual ITree * | findTree (const std::string &path)=0 |
virtual bool | cd (const std::string &path)=0 |
virtual std::string | pwd () const =0 |
virtual bool | ls (const std::string &path=".", bool recursive=false, std::ostream &os=std::cout) const =0 |
virtual std::vector< std::string > | listObjectNames (const std::string &path=".", bool recursive=false) const =0 |
virtual std::vector< std::string > | listObjectTypes (const std::string &path=".", bool recursive=false) const =0 |
virtual bool | mkdir (const std::string &path)=0 |
virtual bool | mkdirs (const std::string &path)=0 |
virtual bool | rmdir (const std::string &path)=0 |
virtual bool | rm (const std::string &path)=0 |
virtual std::string | findPath (const IManagedObject &object) const =0 |
virtual bool | mv (const std::string &oldPath, const std::string &newPath)=0 |
virtual bool | commit ()=0 |
virtual void | setOverwrite (bool overwrite=true)=0 |
virtual bool | cp (const std::string &oldPath, const std::string &newPath, bool recursive=false)=0 |
virtual bool | symlink (const std::string &path, const std::string &alias)=0 |
virtual bool | mount (const std::string &path, ITree &tree, const std::string &treePath)=0 |
virtual bool | unmount (const std::string &path)=0 |
virtual bool | close ()=0 |
virtual void * | cast (const std::string &className) const =0 |
|
Destructor.
|
|
See IManagedObject for a description.
|
|
Change to a given directory.
|
|
Closes the underlying store. Changes will be saved only if commit() has been called before. The call is propagated to the dependent mounted trees.
|
|
Commit any open transaction to the underlying store(s). It flushes objects into the disk for non-memory-mapped stores.
Referenced by AnalysisHandler::finalize(), and main(). |
|
Copy an object from a path to another.
|
|
Get the IManagedObject at a given path in the ITree. The path can either be absolute or relative to the current working directory.
|
|
Get the full path of an IManagedObject.
|
|
Get a mounted ITree at a given path in the current ITree. The path can either be absolute or relative to the current working directory.
|
|
Get the list of names of the IManagedObjects under a given path, including directories (but not "." and ".."). Directories end with "/". The returned names are appended to the given path unless the latter is ".".
|
|
Get the list of types of the IManagedObjects under a given path. The types are the leaf class of the Interface, e.g. "IHistogram1D", "ITuple", etc. Directories are marked with "dir". The order of the types is the same as the order for the listObjectNames() method to achieve a one-to-one correspondance between object names and types.
|
|
List, into a given output stream, all the IManagedObjects, including directories (but not "." and ".."), in a given path. Directories end with "/". The list can be recursive.
|
|
Create a new directory. Given a path only the last directory in it is created if all the intermediate subdirectories already exist.
|
|
Create a directory recursively. Given a path the last directory and all the intermediate non-existing subdirectories are created.
|
|
Mounts a tree within another (target) tree. A tree can only be mounted once. Example: target.mount("/home/tonyj",tree,"/");
|
|
Move an IManagedObject or a directory from one directory to another.
|
|
Get the path of the current working directory.
|
|
Remove an IManagedObject by specifying its path. If the path points to a mount point, the mount point should first commit, then close and delete the tree object.
|
|
Remove a directory and all the contents underneeth.
|
|
Set the strategy of what should happen if two objects have the same path. Default is overwrite.
|
|
Get the name of the store.
|
|
Create a symbolic link to an object in the ITree.
|
|
Unmount a subtree at a given path (mount point). Whenever a tree is destroyed it first unmounts all dependent trees.
|