Classes | |
class | Directory |
Nicely wrap access to directories. More... | |
Functions | |
std::auto_ptr< struct stat > | stat (const std::string &pathname) |
stat() the given file and return the struct stat with the results. | |
bool | access (const std::string &s, int m) |
access() a filename | |
std::string | abspath (const std::string &pathname) |
Get the absolute path of a file. | |
void | mkdirIfMissing (const std::string &dir, mode_t mode) |
Create the given directory, if it does not already exists. | |
void | mkpath (const std::string &dir) |
Create all the component of the given directory, including the directory itself. | |
void | mkFilePath (const std::string &file) |
Ensure that the path to the given file exists, creating it if it does not. |
std::string wibble::sys::fs::abspath | ( | const std::string & | pathname | ) |
Get the absolute path of a file.
References wibble::sys::process::getcwd(), wibble::str::joinpath(), and wibble::str::normpath().
bool wibble::sys::fs::access | ( | const std::string & | s, | |
int | m | |||
) |
access() a filename
Referenced by TestFs::_mkFilePath(), TestFs::_mkPath2(), wibble::commandline::ExistingFile::parse(), and TestException::system().
void wibble::sys::fs::mkdirIfMissing | ( | const std::string & | dir, | |
mode_t | mode | |||
) |
void wibble::sys::fs::mkFilePath | ( | const std::string & | file | ) |
Ensure that the path to the given file exists, creating it if it does not.
The file itself will not get created.
References mkpath().
Referenced by TestFs::_mkFilePath().
void wibble::sys::fs::mkpath | ( | const std::string & | dir | ) |
Create all the component of the given directory, including the directory itself.
References mkdirIfMissing().
Referenced by TestFs::_mkPath(), TestFs::_mkPath2(), and mkFilePath().
std::auto_ptr< struct stat > wibble::sys::fs::stat | ( | const std::string & | pathname | ) |
stat() the given file and return the struct stat with the results.
If the file does not exist, return NULL. Raises exceptions in case of errors.
Referenced by mkdirIfMissing(), and wibble::sys::fs::Directory::valid().