Repository navigation
File Manager
SpaceOC edited this page Aug 29, 2024
·
2 revisions
Class fileManager
#include "Core/base/data/file_manager.h"-
fileExist(const std::filesystem::path& filePath)is a bool variable. Returns true if the specified file exists. -
folderExist(const std::filesystem::path& folderPath)- bool variable. Returns true if the specified folder exists. -
folderIsEmpty(const std::filesystem::path& folderPath)- bool variable. Returns true if the specified folder is empty. -
createFile(const std::filesystem::path& filePath)- function. Creates a file at the specified path (always write the full path to the existing folder with the file name and extension!). -
createFile(const std::filesystem::path& filePath, const std::string& firstData)- function. Creates a file at the specified path and then writes the data from the firstData argument (always write the full path to the existing folder with the file name and its extension!). -
createFiles(const std::vector<std::filesystem::path>& filePath)- function. Creates files by specified paths (always write full path to an existing folder with file name and extension!). -
deleteFile(const std::filesystem::path& filePath)- function. Deletes the specified file (always write the full path to an existing folder with the file name and its extension!). -
renameFile(const std::filesystem::path& filePath, const std::filesystem::path& newFileName)- function. Renames a file (always write the full path to an existing folder with the file name and extension!). -
readFile(const std::filesystem::path& filePath)- string variable. Returns the full text of the specified file. -
createFolder(const std::filesystem::path& folderPath)- function. Creates the specified folder (always write the full path to an existing folder with your folder name). -
createFolders(const std::vector<std::filesystem::path>& folderPath)- function. Creates the specified folders (always write the full path to an existing folder with your folder name). -
deleteFolder(const std::filesystem::path& folderPath)- function. Deletes the specified folder (always write the full path to an existing folder with your folder name). getFileIfstream(std::filesystem::path filePath, std::ios_base::openmode mode)getFileOfstream(std::filesystem::path filePath, std::ios_base::openmode mode)getFileFstream(std::filesystem::path filePath, std::ios_base::openmode mode)