FIND_LOCAL_COMMAND_WIN32_DEF(LIBBATCH_RM_COMMAND rm del)
FIND_LOCAL_COMMAND(LIBBATCH_SH_COMMAND sh cmd.exe)
FIND_LOCAL_COMMAND_WIN32_DEF(LIBBATCH_CP_COMMAND cp copy)
- FIND_LOCAL_COMMAND_WIN32_DEF(LIBBATCH_MKDIR_COMMAND mkdir mkdir)
+ FIND_LOCAL_COMMAND_WIN32_DEF(LIBBATCH_MKDIR_COMMAND mkdir md)
FIND_LOCAL_COMMAND(LIBBATCH_RSH_COMMAND rsh rsh)
FIND_LOCAL_COMMAND(LIBBATCH_RCP_COMMAND rcp rcp)
FIND_LOCAL_COMMAND(LIBBATCH_SSH_COMMAND ssh plink)
string CommunicationProtocol::getRemoveSubCommand(const string & path) const
{
+#ifdef WIN32
+ return string("del /s ") + path;
+#else
return string("rm ") + path;
+#endif
}
string CommunicationProtocol::getRemoveDirectorySubCommand(const string & path) const
{
+#ifdef WIN32
+ return string("rd /s /q ") + path;
+#else
return string("rm -fR ") + path;
+#endif
}
string CommunicationProtocol::getMakeDirectorySubCommand(const string & path) const
{
+#ifdef WIN32
+ return string("md ") + path;
+#else
return string("mkdir -p ") + path;
+#endif
}
int CommunicationProtocol::removeFile(const std::string & path,