#pragma once #include #include #include "OwnedMemory.hpp" #include "DataView.hpp" namespace odhtdb { class FileException : public std::runtime_error { public: FileException(const std::string &errMsg) : std::runtime_error(errMsg) {} }; // Throws FileException on error OwnedByteArray fileGetContent(const boost::filesystem::path &filepath); // Creates file if it doesn't exist. // Throws FileException on error void fileAppend(const boost::filesystem::path &filepath, const DataView &data); // Creates a file if it doesn'te xist. // Throws FileException on error. void fileOverwrite(const boost::filesystem::path &filepath, const DataView &data); }