Salome HOME
projects
/
tools
/
libbatch.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Adaptations for Windows
[tools/libbatch.git]
/
src
/
Core
/
CommunicationProtocol.cxx
diff --git
a/src/Core/CommunicationProtocol.cxx
b/src/Core/CommunicationProtocol.cxx
index 1e50417926fd6fb98fd06eb54c8fdcf12c5618c0..aaee92b1c16073fb9e3e8eaef4657cc9e3cf11a8 100644
(file)
--- a/
src/Core/CommunicationProtocol.cxx
+++ b/
src/Core/CommunicationProtocol.cxx
@@
-1,4
+1,4
@@
-// Copyright (C) 2007-201
5
CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-201
9
CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@
-123,17
+123,29
@@
namespace Batch {
string CommunicationProtocol::getRemoveSubCommand(const string & path) const
{
string CommunicationProtocol::getRemoveSubCommand(const string & path) const
{
+#ifdef WIN32
+ return string("del /s ") + path;
+#else
return string("rm ") + path;
return string("rm ") + path;
+#endif
}
string CommunicationProtocol::getRemoveDirectorySubCommand(const string & path) const
{
}
string CommunicationProtocol::getRemoveDirectorySubCommand(const string & path) const
{
+#ifdef WIN32
+ return string("rd /s /q ") + path;
+#else
return string("rm -fR ") + path;
return string("rm -fR ") + path;
+#endif
}
string CommunicationProtocol::getMakeDirectorySubCommand(const string & path) const
{
}
string CommunicationProtocol::getMakeDirectorySubCommand(const string & path) const
{
+#ifdef WIN32
+ return string("md ") + path;
+#else
return string("mkdir -p ") + path;
return string("mkdir -p ") + path;
+#endif
}
int CommunicationProtocol::removeFile(const std::string & path,
}
int CommunicationProtocol::removeFile(const std::string & path,