Path.resolve()
Make the path absolute, resolving any symlinks. A new path object is returned:
>>> p = Path()
>>> p
PosixPath('.')
>>> p.resolve()
PosixPath('/home/antoine/pathlib')
”..” components are also eliminated (this is the only method to do so):
>>> p = Path('docs/../setup.py')
>>> p.resolve()
PosixPath('/home/antoine/pathlib/setup.py')
If the path doesn’t exist, FileNotFoundError is raised. If an infinite loop is encountered along the resolution path, RuntimeError is raised.
Please login to continue.