wibble
0.1.28
|
#include <wibble/sys/fs.h>
#include <wibble/sys/process.h>
#include <wibble/string.h>
#include <wibble/exception.h>
#include <fstream>
#include <sys/stat.h>
#include <unistd.h>
#include <errno.h>
#include <malloc.h>
Namespaces | |
namespace | wibble |
namespace | wibble::sys |
namespace | wibble::sys::fs |
Functions | |
std::string | wibble::sys::fs::readFile (const std::string &file) |
Read whole file into memory. Throws exceptions on failure. | |
void | wibble::sys::fs::writeFile (const std::string &file, const std::string &data) |
Write data to file, replacing existing contents if it already exists. | |
bool | wibble::sys::fs::deleteIfExists (const std::string &file) |
Delete a file if it exists. | |
void | wibble::sys::fs::renameIfExists (const std::string &src, const std::string &dst) |
Move src to dst, without raising exception if src does not exist. | |
void | wibble::sys::fs::unlink (const std::string &fname) |
Delete the file. | |
void | wibble::sys::fs::rmdir (const std::string &dirname) |
Remove the directory using rmdir(2) | |
void | wibble::sys::fs::rmtree (const std::string &dir) |
Delete the directory dir and all its content. |