Update of /cvsroot/compbench/CompBenchmarks++/System
In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv21947
Modified Files:
System.h System-Unix.cpp System-Unix.h
Log Message:
Changes requiered by fetch mode.
Index: System-Unix.cpp
===================================================================
RCS file: /cvsroot/compbench/CompBenchmarks++/System/System-Unix.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** System-Unix.cpp 14 Sep 2006 17:42:53 -0000 1.2
--- System-Unix.cpp 24 Sep 2006 16:30:43 -0000 1.3
***************
*** 23,26 ****
--- 23,39 ----
}
+ int CBMSystemUnix::copy(std::string from, std::string to)
+ {
+ std::string cmd;
+ std::string stdout;
+
+ cmd="cp -f ";
+ cmd+=from;
+ cmd+=" ";
+ cmd+=to;
+
+ return(exec(cmd, stdout));
+ }
+
int CBMSystemUnix::exec(std::string& command, std::string& result)
{
Index: System-Unix.h
===================================================================
RCS file: /cvsroot/compbench/CompBenchmarks++/System/System-Unix.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** System-Unix.h 19 Sep 2006 17:08:24 -0000 1.3
--- System-Unix.h 24 Sep 2006 16:30:43 -0000 1.4
***************
*** 32,35 ****
--- 32,37 ----
CBMSystemUnix();
+ virtual int copy(std::string from, std::string to);
+
/** Creates a directory
* Uses mkdir() POSIX call.
Index: System.h
===================================================================
RCS file: /cvsroot/compbench/CompBenchmarks++/System/System.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** System.h 20 Sep 2006 08:22:21 -0000 1.7
--- System.h 24 Sep 2006 16:30:43 -0000 1.8
***************
*** 141,144 ****
--- 141,152 ----
std::string localfile);
+ /** Copy a local file.
+ * Will uses cp on UNIX.
+ * \param from source file to be copied
+ * \param to destination of the file
+ * \return 1 if ok.
+ */
+ virtual int copy(std::string from, std::string to) = 0;
+
/** Creates a directory
* \param dir directory name
|