 |
Cytopia
0.3
A city building simulation game
|
Go to the documentation of this file. 1 #ifndef FILESYSTEM_HXX_
2 #define FILESYSTEM_HXX_
std::string readFileAsString(const std::string &fileName, bool binaryMode=false)
Read contents from a file as string.
void writeStringToFileCompressed(const std::string &fileName, const std::string &stringToWrite)
Write a string to a file and compress it.
bool fileExists(const std::string &filePath)
Check if a file (or folder) exists.
std::vector< std::string > getDirectoryListing(const std::string &directory)
Get a directory listing of a given directory.
std::string getBasePath()
Get base path (where Cytopia is being run)
void createDirectory(const std::string &dir)
void writeStringToFile(const std::string &fileName, const std::string &stringToWrite, bool binaryMode=false)
Write a string to a file.
std::vector< std::string > getSaveGamePaths()
Get all savegames in the savegame directory.
std::string readCompressedFileAsString(const std::string &fileName)
Read contents from a file as string.