|
std::string | util::fs::abspath (std::string const &path) |
| Returns the absolute representation of the given path.
|
|
std::string | util::fs::basename (std::string const &path) |
| Returns the file name component of the given path.
|
|
void | util::fs::copy_file (char const *src, char const *dst) |
| Copies a file from 'src' to 'dst', throws FileException on error.
|
|
bool | util::fs::dir_exists (char const *pathname) |
| Determines if the given path is a directory.
|
|
std::string | util::fs::dirname (std::string const &path) |
| Returns the directory name component of the given path.
|
|
bool | util::fs::exists (char const *pathname) |
| Determines if the given path is a directory.
|
|
bool | util::fs::file_exists (char const *pathname) |
| Determines if the given path is a file.
|
|
char const * | util::fs::get_app_data_dir (void) |
| Determines the current user's path for application data.
|
|
std::string | util::fs::get_binary_path (void) |
| Returns the path of the binary currently executing.
|
|
char * | util::fs::get_cwd (char *buf, std::size_t size) |
| Determines the current working directory of the process.
|
|
std::string | util::fs::get_cwd_string (void) |
| Determines the CWD and returns a convenient string.
|
|
char const * | util::fs::get_home_dir (void) |
| Determines the home path for the current user.
|
|
bool | util::fs::is_absolute (std::string const &path) |
| Checks whether the given path is absolute.
|
|
std::string | util::fs::join_path (std::string const &path1, std::string const &path2) |
| Concatenate and canonicalize two paths.
|
|
bool | util::fs::mkdir (char const *pathname) |
| Creates a new directory.
|
|
void | util::fs::read_file_to_string (std::string const &filename, std::string *data) |
| Reads the whole file into a string.
|
|
bool | util::fs::rename (char const *from, char const *to) |
| Renames the given file 'from' to new name 'to'.
|
|
std::string | util::fs::replace_extension (std::string const &fn, std::string const &ext) |
| Replaces extension of the given file with 'ext'.
|
|
bool | util::fs::rmdir (char const *pathname) |
| Removes an empty directory.
|
|
std::string | util::fs::sanitize_path (std::string const &path) |
| Canonicalize slashes in the given path.
|
|
bool | util::fs::set_cwd (char const *pathname) |
| Changes the current working directory to 'pathname' and returns true on success.
|
|
bool | util::fs::unlink (char const *pathname) |
| Unlinks (deletes) the given file.
|
|
void | util::fs::write_string_to_file (char const *data, std::size_t len, std::string const &filename) |
| Writes the given data into a file.
|
|
void | util::fs::write_string_to_file (std::string const &data, std::string const &filename) |
| Writes the given data into a file.
|
|