1 // Aleth: Ethereum C++ client, tools and libraries. 2 // Copyright 2014-2019 Aleth Authors. 3 // Licensed under the GNU General Public License, Version 3. 4 5 #pragma once 6 7 #include <string> 8 #include <boost/filesystem.hpp> 9 10 namespace dev 11 { 12 13 /// Sets the data dir for the default ("ethereum") prefix. 14 void setDataDir(boost::filesystem::path const& _dir); 15 /// @returns the path for user data. 16 boost::filesystem::path getDataDir(std::string _prefix = "ethereum"); 17 /// @returns the default path for user data, ignoring the one set by `setDataDir`. 18 boost::filesystem::path getDefaultDataDir(std::string _prefix = "ethereum"); 19 /// Sets the ipc socket dir 20 void setIpcPath(boost::filesystem::path const& _ipcPath); 21 /// @returns the ipc path (default is DataDir) 22 boost::filesystem::path getIpcPath(); 23 24 /// @returns a new path whose file name is suffixed with the given suffix. 25 boost::filesystem::path appendToFilename(boost::filesystem::path const& _orig, std::string const& _suffix); 26 27 } 28