PyDocs

Nav

File and Directory Access

Path.readlink

pathlib

method of Path · Added in 3.9 (source)
  • Path.readlink()
Return the path to which the symbolic link points.
Changed in 3.13
  • 3.13: Raises UnsupportedOperation if os.readlink() is not available. In previous versions, NotImplementedError was raised.
1 Example
>>> p = Path('mylink')
>>> p.symlink_to('setup.py')
>>> p.readlink()
PosixPath('setup.py')
from the Python docs
See Also
No see-alsos for pathlib/Path.readlink
0 Notes
No notes for Path.readlink