Convert a path to an absolute path using os.path.abspath. Prefer this over Path.resolve() (see #6523). Prefer this over Path.absolute() (not public, doesn't normalize).
(path: str | os.PathLike[str])
| 987 | |
| 988 | |
| 989 | def absolutepath(path: str | os.PathLike[str]) -> Path: |
| 990 | """Convert a path to an absolute path using os.path.abspath. |
| 991 | |
| 992 | Prefer this over Path.resolve() (see #6523). |
| 993 | Prefer this over Path.absolute() (not public, doesn't normalize). |
| 994 | """ |
| 995 | return Path(os.path.abspath(path)) |
| 996 | |
| 997 | |
| 998 | def commonpath(path1: Path, path2: Path) -> Path | None: |
no outgoing calls