PyDocs

Nav

Generic Operating System Services

symlink

os

functionUnixWindows
  • symlink(src, dst, target_is_directory=False, *, dir_fd=None)
Create a symbolic link pointing to src named dst.

target_is_directory is required on Windows if the target is to be
interpreted as a directory.  (On Windows, symlink requires Windows 6.0
or greater, and raises a NotImplementedError otherwise.)
target_is_directory is ignored on non-Windows platforms.

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, and now allow target_is_directory on non-Windows platforms.
  • 3.6: Accepts a path-like object for src and dst.
  • 3.8: Added support for unelevated symlinks on Windows with Developer Mode.
0 Examples
No examples for os/symlink.
See Also
No see-alsos for os/symlink
0 Notes
No notes for symlink