1 |
import * as fs from 'fs'; |
8✔ |
2 |
|
|
3 |
export function unlinkSafe(path: string): boolean { |
8✔ |
4 |
try {
|
48✔ |
5 |
fs.unlinkSync(path); |
48✔ |
6 |
|
|
7 |
return true; |
48✔ |
8 |
} catch {
|
|
9 |
return false; |
× |
10 |
} |
|
11 |
} |