Class that perform file system related tasks.
More...
#include <filesystem.h>
|
| static bool | is_exist (std::string path) |
| | Check if the file to a path exists. More...
|
| |
| static bool | has_parent (std::string path) |
| | Check if a path contains a parent directory. More...
|
| |
| static std::string | parent_path (std::string path) |
| | Get the path to the parent directory. More...
|
| |
| static bool | has_root (std::string path) |
| | Check if a path contains a root path. More...
|
| |
| static bool | create_directory (std::string path) |
| | Create directory to a path. More...
|
| |
| static bool | create_directories (std::string path) |
| | Recursively create directory to a path. More...
|
| |
| static void | rename (std::string old_path, std::string new_path) |
| | Rename the path (equivalently moving a file/directory) More...
|
| |
| static void | remove_file (std::string path) |
| | Delete the file to a path. More...
|
| |
| static void | remove_dir_contents (std::string path) |
| | Delete all the files in a directory. More...
|
| |
| static std::string | find_resource_path (std::string directory, std::string name) |
| | Get a file path in the resource directory. More...
|
| |
| static std::string | resolve_libname (std::string name) |
| | Get a file path in the dynamic library directory. More...
|
| |
Class that perform file system related tasks.
◆ create_directories()
| static bool filesystem::create_directories |
( |
std::string |
path | ) |
|
|
static |
Recursively create directory to a path.
- Returns
true if successful false otherwise.
◆ create_directory()
| static bool filesystem::create_directory |
( |
std::string |
path | ) |
|
|
static |
Create directory to a path.
- Returns
true if successful false otherwise.
◆ find_resource_path()
| static std::string filesystem::find_resource_path |
( |
std::string |
directory, |
|
|
std::string |
name |
|
) |
| |
|
static |
Get a file path in the resource directory.
- Parameters
-
| [in] | directory | Name of the directory |
| [in] | name | Name of the file. |
◆ has_parent()
| static bool filesystem::has_parent |
( |
std::string |
path | ) |
|
|
static |
Check if a path contains a parent directory.
- Parameters
-
- Returns
true if exists false otherwise.
◆ has_root()
| static bool filesystem::has_root |
( |
std::string |
path | ) |
|
|
static |
Check if a path contains a root path.
- Parameters
-
- Returns
true if exists false otherwise.
◆ is_exist()
| static bool filesystem::is_exist |
( |
std::string |
path | ) |
|
|
static |
Check if the file to a path exists.
- Parameters
-
- Returns
true if exists false otherwise.
◆ parent_path()
| static std::string filesystem::parent_path |
( |
std::string |
path | ) |
|
|
static |
Get the path to the parent directory.
- Parameters
-
- Returns
- Path to the parent directory.
◆ remove_dir_contents()
| static void filesystem::remove_dir_contents |
( |
std::string |
path | ) |
|
|
static |
Delete all the files in a directory.
- Parameters
-
| [in] | path | Path to the directory. |
◆ remove_file()
| static void filesystem::remove_file |
( |
std::string |
path | ) |
|
|
static |
Delete the file to a path.
- Parameters
-
| [in] | path | Path to the file to delete. |
◆ rename()
| static void filesystem::rename |
( |
std::string |
old_path, |
|
|
std::string |
new_path |
|
) |
| |
|
static |
Rename the path (equivalently moving a file/directory)
- Parameters
-
| [in] | old_path | Old path. |
| [in] | new_path | New path. |
◆ resolve_libname()
| static std::string filesystem::resolve_libname |
( |
std::string |
name | ) |
|
|
static |
Get a file path in the dynamic library directory.
- Parameters
-
| [in] | name | Name of the dynamic library without "lib" prefix and ".so" suffix. |
The documentation for this class was generated from the following file: