A utility class providing functions to handle files and directories.
More...
#include <filesystemCommon.hpp>
|
static std::string | getLastDirectoryName (const std::string &path) |
| Get the last directory name from a given path.
|
|
static std::string | getProgramFolderPath (std::string programName) |
| Get the program folder path.
|
|
static void | createDirectoryIfNotExists (const std::string &path) |
| Create a directory at the given path if it does not already exist.
|
|
A utility class providing functions to handle files and directories.
- Author
- Norman Hutte
- Date
- 06 March 2024
◆ createDirectoryIfNotExists()
void filesystemCommon::createDirectoryIfNotExists |
( |
const std::string & | path | ) |
|
|
static |
Create a directory at the given path if it does not already exist.
- Parameters
-
path | The path where the directory should be created. |
- Author
- Norman Hutte
- Date
- 06 March 2024
◆ getLastDirectoryName()
std::string filesystemCommon::getLastDirectoryName |
( |
const std::string & | path | ) |
|
|
static |
Get the last directory name from a given path.
- Parameters
-
path | The path to extract the last directory name from. |
- Returns
- std::string The last directory name in the given path.
- Author
- Norman Hutte
- Date
- 06 March 2024
◆ getProgramFolderPath()
std::string filesystemCommon::getProgramFolderPath |
( |
std::string | programName | ) |
|
|
static |
Get the program folder path.
- Parameters
-
programName | The name of the program. |
- Returns
- std::string The path to the program's folder.
- Author
- Norman Hutte
- Date
- 06 March 2024