#include "dated_copy.h" #include "dirname.h" #include "basename.h" #include #include #include #include #include #include IGL_INLINE bool igl::dated_copy(const std::string & src_path, const std::string & dir) { using namespace std; using namespace igl; // Get time and date as string char buffer[80]; time_t rawtime; struct tm * timeinfo; time (&rawtime); timeinfo = localtime (&rawtime); // ISO 8601 format with hyphens instead of colons and no timezone offset strftime (buffer,80,"%Y-%m-%dT%H-%M-%S",timeinfo); string src_basename = basename(src_path); string dst_basename = src_basename+"-"+buffer; string dst_path = dir+"/"+dst_basename; cerr<<"Saving binary to "<