//============================================================================== bool file::copyinternal (const file& dest) const { fileinputstream in (*this); if (dest.deletefile()) { { fileoutputstream out (dest); if (out.failedtoopen()) return false; if (out.writefrominputstream (in, -1) == getsize()) return true; } dest.deletefile(); } return false; }