Public Member Functions |
| | Directory () |
| | Default constructor.
|
| std::vector< std::string > | getChildren () const |
| | List the contents of the directory.
|
| Directory * | lookupDirectory (const std::string &name) |
| | Find the child directory by the given name.
|
| const Directory * | lookupDirectory (const std::string &name) const |
| | Find the child directory by the given name (const version).
|
| Directory * | makeDirectory (const std::string &name) |
| | Find the child directory by the given name, or create it if it doesn't exist.
|
| void | removeDirectory (const std::string &name) |
| | Remove the child directory by the given name, if any.
|
| File * | lookupFile (const std::string &name) |
| | Find the child file by the given name.
|
| const File * | lookupFile (const std::string &name) const |
| | Find the child file by the given name (const version).
|
| File * | makeFile (const std::string &name) |
| | Find the child file by the given name, or create it if it doesn't exist.
|
| bool | removeFile (const std::string &name) |
| | Remove the child file by the given name, if any.
|
| void | dumpSnapshot (Core::ProtoBuf::OutputStream &stream) const |
| | Write the directory and its children to the stream.
|
| void | loadSnapshot (Core::ProtoBuf::InputStream &stream) |
| | Load the directory and its children from the stream.
|
Private Attributes |
| std::map< std::string, Directory > | directories |
| | Map from names of child directories (without trailing slashes) to the Directory objects.
|
| std::map< std::string, File > | files |
| | Map from names of child files to the File objects.
|
An interior object in the Tree; stores other Directories and Files.
Pointers returned by this class are valid until the File or Directory they refer to is removed.
Definition at line 123 of file Tree.h.