MCPcopy Index your code
hub / github.com/EvoMap/evolver / _restoreFileBackupIfPresent

Function _restoreFileBackupIfPresent

src/forceUpdate.js:452–457  ·  view source on GitHub ↗
(backupPath, dstPath)

Source from the content-addressed store, hash-verified

450}
451
452function _restoreFileBackupIfPresent(backupPath, dstPath) {
453 if (!backupPath || !fs.existsSync(backupPath)) return false;
454 try { fs.rmSync(dstPath, { recursive: true, force: true }); } catch (_) {}
455 fs.copyFileSync(backupPath, dstPath);
456 return true;
457}
458
459function _commitAtomicFileReplacement(srcPath, dstPath, tmpPath, backupPath) {
460 try { fs.rmSync(tmpPath, { force: true }); } catch (_) {}

Callers 1

_installDownloadedTreeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected