diff --git a/libtestutils/BlockChainLoader.h b/libtestutils/BlockChainLoader.h index 728860727..6cb04c53c 100644 --- a/libtestutils/BlockChainLoader.h +++ b/libtestutils/BlockChainLoader.h @@ -24,7 +24,7 @@ #include #include #include -#include "ShortLivingDirectory.h" +#include "TransientDirectory.h" namespace dev { @@ -43,7 +43,7 @@ public: eth::State const& state() const { return m_state; } private: - ShortLivingDirectory m_dir; + TransientDirectory m_dir; std::auto_ptr m_bc; eth::State m_state; }; diff --git a/libtestutils/ShortLivingDirectory.cpp b/libtestutils/TransientDirectory.cpp similarity index 85% rename from libtestutils/ShortLivingDirectory.cpp rename to libtestutils/TransientDirectory.cpp index f60e12a86..48beca7e3 100644 --- a/libtestutils/ShortLivingDirectory.cpp +++ b/libtestutils/TransientDirectory.cpp @@ -14,20 +14,20 @@ You should have received a copy of the GNU General Public License along with cpp-ethereum. If not, see . */ -/** @file ShortLivingDirectory.cpp +/** @file TransientDirectory.cpp * @author Marek Kotewicz * @date 2015 */ #include #include -#include "ShortLivingDirectory.h" +#include "TransientDirectory.h" using namespace std; using namespace dev; using namespace dev::test; -ShortLivingDirectory::ShortLivingDirectory(std::string const& _path) : m_path(_path) +TransientDirectory::TransientDirectory(std::string const& _path) : m_path(_path) { // we never ever want to delete a directory (including all its contents) that we did not create ourselves. if (boost::filesystem::exists(m_path)) @@ -36,7 +36,7 @@ ShortLivingDirectory::ShortLivingDirectory(std::string const& _path) : m_path(_p boost::filesystem::create_directories(m_path); } -ShortLivingDirectory::~ShortLivingDirectory() +TransientDirectory::~TransientDirectory() { boost::filesystem::remove_all(m_path); } diff --git a/libtestutils/ShortLivingDirectory.h b/libtestutils/TransientDirectory.h similarity index 88% rename from libtestutils/ShortLivingDirectory.h rename to libtestutils/TransientDirectory.h index 10b542f06..328b4c92b 100644 --- a/libtestutils/ShortLivingDirectory.h +++ b/libtestutils/TransientDirectory.h @@ -14,7 +14,7 @@ You should have received a copy of the GNU General Public License along with cpp-ethereum. If not, see . */ -/** @file ShortLivingDirectory.h +/** @file TransientDirectory.h * @author Marek Kotewicz * @date 2015 */ @@ -34,11 +34,11 @@ namespace test * It creates temporary directory in the given path. On dealloc it removes the directory * @throws if the given path already exists, throws an exception */ -class ShortLivingDirectory +class TransientDirectory { public: - ShortLivingDirectory(std::string const& _path = getRandomPath()); - ~ShortLivingDirectory(); + TransientDirectory(std::string const& _path = getRandomPath()); + ~TransientDirectory(); std::string const& path() const { return m_path; }