void AMerge::clear_src() { cout << "Remove source files ..." << flush; foreach( fs::path dir, _directories ) { Stat status; status.scan_directory( dir, SCAN_MODE_RECURSIVE | SCAN_MODE_FILES | SCAN_MODE_DIRS ); status.remove(); }
void cleanup() { Stat stat; stat.scan_directory( fs::path(".test"), SCAN_MODE_RECURSIVE | SCAN_MODE_FILES | SCAN_MODE_DIRS ); stat.sort(); std::reverse( stat.begin(), stat.end() ); stat.remove(); fs::remove( fs::path(".test") ); }