Salome HOME
- Fixes for BatchManager_Local
[tools/libbatch.git] / src / Core / Utils.hxx
index 0c6f51587949be8a486b0c67d7dfcc208fb3dd2a..f5fb5d8de136709937cdc958642eeec925c85ace 100644 (file)
@@ -63,6 +63,22 @@ public:
   static std::string createAndOpenTemporaryFile(const std::string & prefix,
                                                 std::ofstream & outputStream);
 
+  /**
+   * Change permissions of a file
+   */
+  static int chmod(const char *path, int mode);
+
+  /**
+   * Sleep for the number of specified seconds
+   */
+  static void sleep(unsigned int seconds);
+
+  /**
+   * Simple method to fix path strings depending on the platform. On Windows, it will replace
+   * forward slashes '/' by backslashes '\'. On Unix, the path is just copied without change.
+   */
+  static std::string fixPath(const std::string & path);
+
 private:
 
   // No instanciation possible as this class provides only static methods