(directoryPath: any)
| 8 | }; |
| 9 | |
| 10 | export const deleteFolderRecursive = (directoryPath: any): void => { |
| 11 | if (existsSync(directoryPath)) { |
| 12 | readdirSync(directoryPath).forEach((file) => { |
| 13 | const curPath = join(directoryPath, file); |
| 14 | if (lstatSync(curPath).isDirectory()) { |
| 15 | deleteFolderRecursive(curPath); |
| 16 | } else { |
| 17 | unlinkSync(curPath); |
| 18 | } |
| 19 | }); |
| 20 | rmdirSync(directoryPath); |
| 21 | } |
| 22 | }; |
| 23 | |
| 24 | export interface ReaddirPOptions { |
| 25 | /** |
no outgoing calls
no test coverage detected