]> git.lyx.org Git - lyx.git/blobdiff - src/support/copy.C
Add a bunch of c_str() for string stream uses; remove lyxfunc symbol-insert.
[lyx.git] / src / support / copy.C
index 7324d445681efc00ab011cf22b5a32e9714fb75f..4c083da791cc7e7d26d6202f1090320e715db2cf 100644 (file)
@@ -2,20 +2,12 @@
 
 #include <fstream>
 
-//#include <stdio.h>
-
 #include "support/lyxlib.h"
 #include "LString.h"
-//#include "support/syscall.h"
 #include "support/filetools.h"
 
 bool lyx::copy(string const & from, string const & to)
 {
-#if 0
-       string command = "cp " + QuoteName(from) + " " + QuoteName(to);
-       return Systemcalls().startscript(Systemcalls::System,
-                                        command) == 0;
-#else
        std::ifstream ifs(from.c_str());
        if (!ifs) return false;
        std::ofstream ofs(to.c_str(), std::ios::out|std::ios::trunc);
@@ -23,5 +15,4 @@ bool lyx::copy(string const & from, string const & to)
        ofs << ifs.rdbuf();
        if (ofs.good()) return true;
        return false;
-#endif
 }