7 #include "support/lyxlib.h"
9 //#include "support/syscall.h"
10 #include "support/filetools.h"
12 bool lyx::copy(string const & from, string const & to)
15 string command = "cp " + QuoteName(from) + " " + QuoteName(to);
16 return Systemcalls().startscript(Systemcalls::System,
19 std::ifstream ifs(from.c_str());
20 if (!ifs) return false;
21 std::ofstream ofs(to.c_str(), std::ios::out|std::ios::trunc);
22 if (!ofs) return false;
24 if (ofs.good()) return true;