|
bool | exists (std::string path) |
| Tells if #path exists. More...
|
|
off_t | size (std::string path) |
| Returns the file size of #path in bytes. More...
|
|
void | mkdir_p (std::string path) |
| Creates #path directory hierarchy recursively, just like UNIX command mkdir -p . More...
|
|
void | rm_rf (std::string path) |
| Removes recursively all files within directory at #path, just like UNIX command rm -rf . More...
|
|
void | rm_f (std::string path) |
| Forcibly removes file within #path. More...
|
|
bool | create (std::string path) |
| Creates empty file #path. More...
|
|
void | write (std::string path, std::string contents) |
| Writes #contents to #path. More...
|
|
bool | isDirectory (std::string path) |
| Tells if #path is a directory. More...
|
|
bool | isFile (std::string path) |
| Tells if #path is a regular file (not a directory, socket, FIFO device or whatever). More...
|
|
std::vector< std::string > | ls (std::string path) |
| Lists all files withing #path. More...
|
|
std::string | getHome () |
| Gets the full path of the home directory for the user running this program. More...
|
|
std::string | getUser () |
| Gets the user name of the person running this program.
|
|
std::string | basename (std::string path) |
| Returns the component of a pathname (file name and extension). More...
|
|
std::string | dropBasename (std::string path) |
| Returns the full pathname up to the last component. More...
|
|
std::string | extension (std::string path) |
| Returns the extension of a file. More...
|
|
std::string | dropExtension (std::string path) |
| Returns the filename without it's extension. More...
|
|
File I/O and Operational System's utilities.
Note, I'm using several POSIX functions. So the following functions surely aren't portable to Windows. Other systems are kinda unpredictable.