CG_Gen::TempProjectDir class

class TempProjectDir This class is for temporary project directory creation and management

Constructors, destructors, conversion operators

TempProjectDir(const std::filesystem::path& i_path, const std::filesystem::path& i_baseDir)
~TempProjectDir()

Public functions

auto createSubDirectory(const std::string& i_name) -> std::filesystem::path
createSubDirectory method for creating directories in temporary project
auto copyFile(const std::filesystem::path& i_source, const std::filesystem::path& i_destination) -> bool
copyFile method creating copy of selected file in specified directory
auto createFile(const std::string& i_filename, const std::string i_content) -> bool
createFile method creates new file with specified name and content

Function documentation

std::filesystem::path CG_Gen::TempProjectDir::createSubDirectory(const std::string& i_name)

createSubDirectory method for creating directories in temporary project

Parameters
i_name name of subdirectory
Returns absolute path for created subdirectory *‍/

bool CG_Gen::TempProjectDir::copyFile(const std::filesystem::path& i_source, const std::filesystem::path& i_destination)

copyFile method creating copy of selected file in specified directory

Parameters
i_source path for thr file being copeied
i_destination the path to the directory to which the copied file will be copied (including filename with extension)
Returns true if copying was successful and false otherwise *‍/

bool CG_Gen::TempProjectDir::createFile(const std::string& i_filename, const std::string i_content)

createFile method creates new file with specified name and content

Parameters
i_filename name of file being created
i_content content of file being created
Returns true if creation was successful and false otherwise *‍/