(file_path: str)
| 54 | |
| 55 | |
| 56 | def remove_dir(file_path: str) -> bool: |
| 57 | if not os.path.lexists(file_path): |
| 58 | return True |
| 59 | if os.path.isfile(file_path) or os.path.islink(file_path): |
| 60 | os.remove(file_path) |
| 61 | else: |
| 62 | shutil.rmtree(file_path, onerror=on_error) |
| 63 | return True |
| 64 | |
| 65 | |
| 66 | def ensure_dir(dir_path: str | Path) -> None: |
no test coverage detected