|
Public Member Functions |
| Directory (const std::string &path) throw (FileError) |
| Constructor, note that path may not exist.
|
| Directory (const File &file) throw (FileError) |
| Equivalent to Directory(file.str());.
|
| ~Directory () |
| Destructor.
|
const std::vector< std::string > & | files () const throw (FileError) |
| Return files (only filenames, not absolute paths) in the directory.
|
std::string | file (const std::string &filename) const |
| Return str()+"/"+filename, i.e.
|
std::string | tempfile (const std::string &prefix) const throw (FileError) |
| Return str()+"/"+temp_filename, where temp_filename starts with prefix, i.e.
|
std::string | tempdir (const std::string &prefix) const throw (FileError) |
| Return str()+"/"+temp_dirname, where temp_dirname starts with prefix, i.e.
|
bool | cd () const throw (FileError) |
| Change working directory.
|
bool | exists () const throw (FileError) |
bool | mkdir (int mode=0755) throw (FileError) |
const char * | path () const |
std::string | str () const |
std::string | realpath () const throw (FileError) |
std::string | relpath (const std::string &from) const throw (FileError) |
std::string | relpath () const throw (FileError) |
time_t | last_modified () const throw (FileError) |
time_t | last_accessed () const throw (FileError) |
bool | touch (int mode=0644) throw (FileError) |
bool | chown (uid_t uid) const throw (FileError) |
bool | chgrp (const char *groupname) const throw (FileError) |
bool | chmod (int mode=0755) throw (FileError) |
bool | rm () throw (FileError) |
bool | mv (const std::string &newpath) throw (FileError) |
void | rmfr () throw (FileError) |
Static Public Member Functions |
std::string | pwd () throw (FileError) |
| Return absolute pathname of current working directory.
|
Private Member Functions |
void | refresh () const throw (FileError) |
| Updates private data members, exist_ and type_.
|
void | init () const throw (FileError) |
Private Attributes |
std::vector< std::string > | files_ |