22 #include <sys/types.h>
55 dir (std::string
const &path);
57 void load (std::string
const &path);
63 unsigned size ()
const;
std::string name
The name of the file.
Definition: dir.hh:36
dir()
Create an empty directory object.
store::const_iterator const_iterator
Iterator for looping over the files.
Definition: dir.hh:51
void load(std::string const &path)
Load new content into an existing directory object.
Get information about files in a directory.
Definition: dir.hh:29
std::set< file > store
Storage of the files.
Definition: dir.hh:49
uid_t uid
The user-ID of the file.
Definition: dir.hh:40
gid_t gid
The group-ID of the file.
Definition: dir.hh:42
const_iterator end() const
Loop over the files.
off_t size
The size of the file.
Definition: dir.hh:44
const_iterator begin() const
Loop over the files.
bool operator<(file const &that) const
Sorting operator, needed for putting them in a std::set.
Information about a single file in a directory.
Definition: dir.hh:33
bool is_dir
Whether it is a directory.
Definition: dir.hh:38
unsigned size() const
Number of files in the directory.