(filePath: string)
| 453 | } |
| 454 | |
| 455 | export function tryDeleteFile(filePath: string) { |
| 456 | if (fs.existsSync(filePath)) { |
| 457 | try { |
| 458 | fs.unlinkSync(filePath); |
| 459 | } catch (e: any) { |
| 460 | console.warn(`Failed to delete file ${filePath}: ${e}`); |
| 461 | } |
| 462 | } |
| 463 | } |
| 464 | |
| 465 | export function getRandomInt(min: number, max: number) { |
| 466 | min = Math.ceil(min); |
no test coverage detected