HierAgent
VHierAgent is a generalised way of working with tree data.
Current interfaces provide for accessing the following tree types;
- Windows Registry
- Windows File System
- FTP Server
- Virtual File System
All of these classes inherit the same pseudo abstract base class VHierAgent. The scheme is fully extensible to cater for new tree style folder/file/data based structures. Full support for creation of keys/folders and values/files is provided. In addition recursive and leaf only deletion, copy, move, get and set are provided.
A token scheme is implemented which allows handles to multiple current directories to be held. The HierAgent always knows what the instantaneous path is, and is capable of enumerating all files and directories at the instantaneous path. The HierAgent is capable of working with metadata where this is supported by the target tree system.
All interfaces but the virtual file system are fairly self explanatory. The virtual file system is file system but it is stored in a single binary image. This image can be serialized in the normal way. This capability can be used, for example, to create project files on disk. Another use perhaps, is to serialise part of an existing tree in any of these formats to the clipboard. This allows cut and paste operations to be implemented with very little coding overhead.
|