Directory: add constructor and destructor

This commit is contained in:
Max Kellermann
2013-01-03 01:36:28 +01:00
parent 3e8047e583
commit f5a92d6cc3
4 changed files with 45 additions and 18 deletions

View File

@@ -90,6 +90,19 @@ struct Directory {
bool have_stat; /* not needed if ino_t == dev_t == 0 is impossible */
char path[sizeof(long)];
protected:
Directory(const char *path);
gcc_malloc gcc_nonnull_all
static Directory *Allocate(const char *path);
public:
/**
* Default constructor, needed for #detached_root.
*/
Directory() = default;
~Directory();
/**
* Generic constructor for #Directory object.
*/