(path)
| 60 | |
| 61 | |
| 62 | def remove(path): |
| 63 | logger.debug("Removing '%s'", path) |
| 64 | |
| 65 | try: |
| 66 | if os.path.isdir(path): |
| 67 | shutil.rmtree(path, onerror=_chmod) |
| 68 | else: |
| 69 | _unlink(path, _chmod) |
| 70 | except OSError as exc: |
| 71 | if exc.errno != errno.ENOENT: |
| 72 | raise |
| 73 | |
| 74 | |
| 75 | def path_isin(child: "StrPath", parent: "StrPath") -> bool: |