#include "bbtkUtilities.h"
+
namespace bbtk
{
return libname;
}
+ // =======================================================================
+ /// Builds the complete path to the file 'name' located
+ /// in user settings dir, e.g. /home/username/.bbtk/
+ std::string Utilities::MakeUserSettingsFullFileName(const std::string& name)
+ {
+#if defined(__GNUC__)
+ std::string str_home(getenv("HOME"));
+#elif defined(_WIN32)
+ std::string str_home(getenv("USERPROFILE"));
+#endif
+ std::string fullname = str_home + "/.bbtk/" + name;
+ Utilities::replace( fullname,
+ INVALID_FILE_SEPARATOR ,
+ VALID_FILE_SEPARATOR);
+ return fullname;
+ }
+
+
+
//========================================================================
bool Utilities::IsAtRoot(std::string cwd)