Salome HOME
updated copyright message
[modules/shaper.git] / src / GeomAlgoAPI / GeomAlgoAPI_Tools.cpp
index 905240030f66ab895adf807a9ec989a4e9da0c6b..dc13d953ce878864c61fe80c6c5c6f3eef1fee1d 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2020  CEA/DEN, EDF R&D
+// Copyright (C) 2014-2023  CEA, EDF
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -61,6 +61,14 @@ std::string File_Tools::name(const std::string& theFileName)
   return aPath.Name().ToCString();
 }
 
+std::string File_Tools::path(const std::string& theFileName)
+{
+  OSD_Path aPath (theFileName.c_str());
+  Standard_Integer aTrekLen =
+    int(theFileName.size()) - aPath.Extension().Length() - aPath.Name().Length();
+  return theFileName.substr(0, aTrekLen);
+}
+
 bool AlgoError::isAlgorithmFailed(const GeomMakeShapePtr& theAlgorithm,
                                   const std::string& theFeature,
                                   std::string& theError)