PyDocs

Nav

Generic Operating System Services

readlink

os

functionUnixWindows
  • readlink(path, *, dir_fd=None)
Return a string representing the path to which the symbolic link points.

If dir_fd is not None, it should be a file descriptor open to
a directory, and path should be relative; path will then be relative to
that directory.

dir_fd may not be implemented on your platform.  If it is unavailable,
using it will raise a NotImplementedError.
Changed in 3.2, 3.3, 3.6, 3.8
  • 3.2: Added support for Windows 6.0 (Vista) symbolic links.
  • 3.3: Added the dir_fd parameter.
  • 3.6: Accepts a path-like object on Unix.
  • 3.8: Accepts a path-like object and a bytes object on Windows. Added support for directory junctions, and changed to return the substitution path (which typically includes \\?\ prefix) rather than the optional “print name” field that was previously returned.
0 Examples
No examples for os/readlink.
See Also
No see-alsos for os/readlink
0 Notes
No notes for readlink