Change the current working directory to the specified path. :param path: The path to change into.
(self, path: str | os.PathLike[str])
| 377 | invalidate_caches() |
| 378 | |
| 379 | def chdir(self, path: str | os.PathLike[str]) -> None: |
| 380 | """Change the current working directory to the specified path. |
| 381 | |
| 382 | :param path: |
| 383 | The path to change into. |
| 384 | """ |
| 385 | if self._cwd is None: |
| 386 | self._cwd = os.getcwd() |
| 387 | os.chdir(path) |
| 388 | |
| 389 | def undo(self) -> None: |
| 390 | """Undo previous changes. |