From: Joel Rosdahl Date: Sat, 24 Aug 2019 20:34:23 +0000 (+0200) Subject: Improve documentation of util::read_file/write_file X-Git-Tag: v4.0~813 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=90a5ba236badf526e44a7d114e4e7f1e298654b9;p=thirdparty%2Fccache.git Improve documentation of util::read_file/write_file --- diff --git a/src/util.hpp b/src/util.hpp index 4753d2a14..c3d58417a 100644 --- a/src/util.hpp +++ b/src/util.hpp @@ -31,6 +31,8 @@ std::string base_name(const std::string& path); std::string dir_name(const std::string& path); // Read file data as a string. +// +// Throws Error on error. std::string read_file(const std::string& path); // Return true if prefix is a prefix of string. @@ -44,6 +46,8 @@ strip_whitespace(const std::string& string); [[gnu::warn_unused_result]] std::string to_lowercase(const std::string& string); // Write file data from a string. +// +// Throws Error on error. void write_file(const std::string& path, const std::string& data, bool binary = false);