Code base obscuration (for images) 1.0
It implements different obscuration methods on portable images (.pgm and .ppm)
Loading...
Searching...
No Matches
filesystemCommon Class Reference

A utility class providing functions to handle files and directories. More...

#include <filesystemCommon.hpp>

Static Public Member Functions

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.
 

Detailed Description

A utility class providing functions to handle files and directories.

Author
Norman Hutte
Date
06 March 2024

Member Function Documentation

◆ createDirectoryIfNotExists()

void filesystemCommon::createDirectoryIfNotExists ( const std::string & path)
static

Create a directory at the given path if it does not already exist.

Parameters
pathThe 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
pathThe 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
programNameThe name of the program.
Returns
std::string The path to the program's folder.
Author
Norman Hutte
Date
06 March 2024