20#include <xrpl/basics/FileUtilities.h>
26 boost::system::error_code& ec,
27 boost::filesystem::path
const& sourcePath,
30 using namespace boost::filesystem;
31 using namespace boost::system::errc;
37 if (maxSize && (file_size(fullPath, ec) > *maxSize || ec))
44 ifstream fileStream(fullPath, std::ios::in);
67 boost::system::error_code& ec,
68 boost::filesystem::path
const& destPath,
71 using namespace boost::filesystem;
72 using namespace boost::system::errc;
74 ofstream fileStream(destPath, std::ios::out | std::ios::trunc);
82 fileStream << contents;
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
std::error_code make_error_code(ripple::TokenCodecErrc e)
std::string getFileContents(boost::system::error_code &ec, boost::filesystem::path const &sourcePath, std::optional< std::size_t > maxSize=std::nullopt)
void writeFileContents(boost::system::error_code &ec, boost::filesystem::path const &destPath, std::string const &contents)