Skip to content

replaceFile

View as Markdown
function replaceFile(
tmp,
dest,
o?
): Promise<void>;

Defined in: agent/src/perms.ts:90

Atomically replaces dest with tmp. Windows: retries EPERM / EBUSY / EACCES (an antivirus scan or an open reader briefly holds the file) 10 times, 50 ms apart.

Parameter Type
tmp string
dest string
o? { platform?: Platform; rename?: (a, b) => Promise<void>; }
o.platform? Platform
o.rename? (a, b) => Promise<void>

Promise<void>