(oldPath: fs.PathLike, newPath: fs.PathLike)
| 355 | } |
| 356 | |
| 357 | async function renameSafe(oldPath: fs.PathLike, newPath: fs.PathLike) { |
| 358 | if (process.platform === `win32`) { |
| 359 | await renameUnderWindows(oldPath, newPath); |
| 360 | } else { |
| 361 | await fs.promises.rename(oldPath, newPath); |
| 362 | } |
| 363 | } |
| 364 | |
| 365 | async function renameUnderWindows(oldPath: fs.PathLike, newPath: fs.PathLike) { |
| 366 | // Windows malicious file analysis blocks files currently under analysis, so we need to wait for file release |
no test coverage detected
searching dependent graphs…