Salome HOME
Add rsync as a new protocol for copy.
[tools/libbatch.git] / src / Core / Utils.cxx
index cd3deb0455a59950ed2a0b0de7f51a2eee15206e..b7371f905b6e3acb041b7ff3936db28ec790f83e 100644 (file)
@@ -97,6 +97,16 @@ std::string Utils::dirname(const std::string & path)
     return std::string(".");
 }
 
+bool Utils::isOption(const std::string & val)
+{
+  return val.size() > 0 && val[0] == '-';
+}
+
+bool Utils::usesRsyncRelativePath(const std::string & path)
+{
+  return path.find("/./") != std::string::npos;
+}
+
 string Utils::createAndOpenTemporaryFile(const string & prefix, ofstream & outputStream)
 {
   if (outputStream.is_open())