diff options
Diffstat (limited to 'src/third_party/boost-1.69.0/boost/filesystem/string_file.hpp')
-rw-r--r-- | src/third_party/boost-1.69.0/boost/filesystem/string_file.hpp | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/src/third_party/boost-1.69.0/boost/filesystem/string_file.hpp b/src/third_party/boost-1.69.0/boost/filesystem/string_file.hpp deleted file mode 100644 index 015f659080a..00000000000 --- a/src/third_party/boost-1.69.0/boost/filesystem/string_file.hpp +++ /dev/null @@ -1,43 +0,0 @@ -// filesystem/string_file.hpp --------------------------------------------------------// - -// Copyright Beman Dawes 2015 - -// Distributed under the Boost Software License, Version 1.0. -// See http://www.boost.org/LICENSE_1_0.txt - -// Library home page: http://www.boost.org/libs/filesystem - -#ifndef BOOST_FILESYSTEM_STRING_FILE_HPP -#define BOOST_FILESYSTEM_STRING_FILE_HPP - -#include <string> -#include <boost/filesystem/fstream.hpp> -#include <boost/filesystem/operations.hpp> - -namespace boost -{ -namespace filesystem -{ -inline -void save_string_file(const path& p, const std::string& str) -{ - ofstream file; - file.exceptions(std::ofstream::failbit | std::ofstream::badbit); - file.open(p, std::ios_base::binary); - file.write(str.c_str(), str.size()); -} - -inline -void load_string_file(const path& p, std::string& str) -{ - ifstream file; - file.exceptions(std::ifstream::failbit | std::ifstream::badbit); - file.open(p, std::ios_base::binary); - std::size_t sz = static_cast<std::size_t>(file_size(p)); - str.resize(sz, '\0'); - file.read(&str[0], sz); -} -} // namespace filesystem -} // namespace boost - -#endif // include guard |