Function
copyIfExists
(sourcePath: string, destinationPath: string)
Source from the content-addressed store, hash-verified
| 777 | } |
| 778 | |
| 779 | async function copyIfExists(sourcePath: string, destinationPath: string): Promise<void> { |
| 780 | try { |
| 781 | await fsPromises.copyFile(sourcePath, destinationPath); |
| 782 | } catch (error) { |
| 783 | if (!isErrnoWithCode(error, "ENOENT")) { |
| 784 | throw error; |
| 785 | } |
| 786 | } |
| 787 | } |
| 788 | |
| 789 | async function resetForkedSessionUsage( |
| 790 | sessionUsageService: SessionUsageService | undefined, |
Tested by
no test coverage detected