(dir_path)
| 332 | } |
| 333 | |
| 334 | export const deleteDir = function (dir_path) { |
| 335 | if (fs.existsSync(dir_path)) { |
| 336 | fs.readdirSync(dir_path).forEach(function (entry) { |
| 337 | const entry_path = path.join(dir_path, entry) |
| 338 | if (fs.lstatSync(entry_path).isDirectory()) { |
| 339 | deleteDir(entry_path) |
| 340 | } else { |
| 341 | fs.unlinkSync(entry_path) |
| 342 | } |
| 343 | }) |
| 344 | fs.rmdirSync(dir_path) |
| 345 | } |
| 346 | } |
| 347 | |
| 348 | /** |
| 349 | * Returns absolute filename to save screenshot. |
no outgoing calls
no test coverage detected