PyDocs

Nav

Generic Operating System Services

link

os

functionUnixWindows
  • link(src, dst, *, src_dir_fd=None, dst_dir_fd=None, follow_symlinks=True)
Create a hard link to a file.

If either src_dir_fd or dst_dir_fd is not None, it should be a file
descriptor open to a directory, and the respective path string (src or
dst) should be relative; the path will then be relative to that
directory.
If follow_symlinks is False, and the last element of src is a symbolic
link, link will create a link to the symbolic link itself instead of the
file the link points to.
src_dir_fd, dst_dir_fd, and follow_symlinks may not be implemented on
your platform.  If they are unavailable, using them will raise
a NotImplementedError.
Changed in 3.2, 3.3, 3.6
  • 3.2: Added Windows support.
  • 3.3: Added the src_dir_fd, dst_dir_fd, and follow_symlinks parameters.
  • 3.6: Accepts a path-like object for src and dst.
0 Examples
No examples for os/link.
See Also
No see-alsos for os/link
0 Notes
No notes for link