23 #include <boost/filesystem.hpp> 30 namespace fs = boost::filesystem;
32 TransientDirectory::TransientDirectory():
40 if (boost::filesystem::exists(
m_path))
41 BOOST_THROW_EXCEPTION(FileError());
43 if (!fs::create_directories(
m_path))
44 BOOST_THROW_EXCEPTION(FileError());
50 boost::system::error_code ec;
51 fs::remove_all(
m_path, ec);
59 this_thread::sleep_for(chrono::milliseconds(10));
62 fs::remove_all(
m_path, ec);
65 cwarn <<
"Failed to delete directory '" <<
m_path <<
"': " << ec.message();
Adapted from code found on http://stackoverflow.com/questions/180947/base64-decode-snippet-in-c Origi...
std::hash for asio::adress
std::string toString(string32 const &_s)
Make normal string from fixed-length string.
Fixed-size raw-byte array container type, with an API optimised for storing hashes.
temporary directory implementation It creates temporary directory in the given path.
#define DEV_IGNORE_EXCEPTIONS(X)