20 #include <ripple/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;
33 path fullPath{canonical(sourcePath, ec)};
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;