|
gz-cpp-util 1.3
A c++20 library containing various utilities
|
Contains file reading/writing utility. More...
Go to the source code of this file.
Functions | |
| template<typename Hash , typename Pred > | |
| void | gz::writeKeyValueFile (const std::string &filepath, const std::unordered_map< std::string, std::string, Hash, Pred > &content) |
| Write a file that contains key = value pairs. More... | |
| template<ReadKeyValueFileImplemented T> | |
| T | gz::readKeyValueFile (const std::string &filepath, bool removeSpaces=false) |
| Read a file that contains key = value pairs. More... | |
| std::vector< char > | gz::readBinaryFile (const std::string &filepath) |
| Read a binary file and return the 8-bit words in a vector. More... | |
Contains file reading/writing utility.
| std::vector< char > gz::readBinaryFile | ( | const std::string & | filepath | ) |
Read a binary file and return the 8-bit words in a vector.
| FileIOError | if the file can not be opened |
| T gz::readKeyValueFile | ( | const std::string & | filepath, |
| bool | removeSpaces = false |
||
| ) |
Read a file that contains key = value pairs.
| FileIOError | if the file can not be opened |
| void gz::writeKeyValueFile | ( | const std::string & | filepath, |
| const std::unordered_map< std::string, std::string, Hash, Pred > & | content | ||
| ) |
Write a file that contains key = value pairs.
This template function is instantiated for the default unordered_map<string, string> and the util::string_map from util/string.hpp
| FileIOError |