(self, path, missing_dir_ok)
| 363 | self.fs.rm(path, recursive=True) |
| 364 | |
| 365 | def _delete_dir_contents(self, path, missing_dir_ok): |
| 366 | try: |
| 367 | subpaths = self.fs.listdir(path, detail=False) |
| 368 | except FileNotFoundError: |
| 369 | if missing_dir_ok: |
| 370 | return |
| 371 | raise |
| 372 | for subpath in subpaths: |
| 373 | if self.fs.isdir(subpath): |
| 374 | self.fs.rm(subpath, recursive=True) |
| 375 | elif self.fs.isfile(subpath): |
| 376 | self.fs.rm(subpath) |
| 377 | |
| 378 | def delete_dir_contents(self, path, missing_dir_ok): |
| 379 | if path.strip("/") == "": |
no outgoing calls
no test coverage detected