FilesTools namespace
namespace FilesTools The Files Tools namespace contains a set of functions designed to work with the file system */
Contents
- Reference
Functions
- auto getDirectories(std::string& path) -> std::vector<std::string>
- getDirectories This function takes the path to a directory and returns a string vector containing the names of all subdirectories of that directory.
- auto isDirectoryExists(const std::string& i_path) -> bool
- isDirectoryExists This method checks if the specified directory exists
- auto getParentDirOf(const std::string& i_path) -> std::string
- getParentDirOf This method returns the parent directory for the specified path
- auto loadStringFile(const std::filesystem::path& p) -> std::string
- loadStringFile This method loads the contents of the file as a string
Function documentation
std::vector<std::string> CG_Gen:: FilesTools:: getDirectories(std::string& path)
getDirectories This function takes the path to a directory and returns a string vector containing the names of all subdirectories of that directory.
| Parameters | |
|---|---|
| path | The path to the directory for which you want to get a list of subdirectories |
| Returns | A string vector containing the names of all subdirectories in the specified directory */ |
bool CG_Gen:: FilesTools:: isDirectoryExists(const std::string& i_path)
isDirectoryExists This method checks if the specified directory exists
| Parameters | |
|---|---|
| i_path | The path to the directory to be checked for existence |
| Returns | true if the directory exists and it is a directory; otherwise false. */ |
std::string CG_Gen:: FilesTools:: getParentDirOf(const std::string& i_path)
getParentDirOf This method returns the parent directory for the specified path
| Parameters | |
|---|---|
| i_path | The path to the file or directory to get the parent directory for |
| Returns | A string representing the path to the parent directory of the specified path */ |
std::string CG_Gen:: FilesTools:: loadStringFile(const std::filesystem::path& p)
loadStringFile This method loads the contents of the file as a string
| Parameters | |
|---|---|
| p | The path to the file whose contents you want to download |
| Returns | A string containing the contents of the file* */ |