X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcreaDevManagerLib%2FCDMUtilities.cpp;h=cc64ee3e96acfa6376010b08e7adc64afc5b29bd;hb=0cc6a7e002ad79de9453517108d7456fd44ddfdb;hp=d67ec36f54feb879c81fdbbda2040ee7caaebc98;hpb=38fb78e3930c8ba01021536630624e4b0b03dd87;p=crea.git diff --git a/lib/creaDevManagerLib/CDMUtilities.cpp b/lib/creaDevManagerLib/CDMUtilities.cpp index d67ec36..cc64ee3 100644 --- a/lib/creaDevManagerLib/CDMUtilities.cpp +++ b/lib/creaDevManagerLib/CDMUtilities.cpp @@ -373,6 +373,19 @@ namespace CDMUtilities return res; } + bool writeFile(const std::string& file_path, const std::string& st) + { + std::ofstream file(file_path.c_str()); + if (file.is_open()) + { + file << st; + file.close(); + return true; + } + return false; + + } + CMLFile readCMLFile(const std::string& file_path) { CMLFile res; @@ -523,6 +536,8 @@ namespace CDMUtilities return false; } + + void normalizeStr(std::string& st) {