ID EN
Pathlib

readlink

Python 3.11

Return the path to which the symbolic link points (as returned by os.readlink()):

Syntax

PYTHON
Path.readlink()

Examples

Example 1
PYTHON
>>> p = Path('mylink')
>>> p.symlink_to('setup.py')
>>> p.readlink()
PosixPath('setup.py')

See Also

os.readlink()