MCPcopy Index your code
hub / github.com/python/cpython / hardlink_to

Method hardlink_to

Lib/pathlib/__init__.py:1422–1428  ·  view source on GitHub ↗

Make this path a hard link pointing to the same file as *target*. Note the order of arguments (self, target) is the reverse of os.link's.

(self, target)

Source from the content-addressed store, hash-verified

1420
1421 if hasattr(os, "link"):
1422 def hardlink_to(self, target):
1423 """
1424 Make this path a hard link pointing to the same file as *target*.
1425
1426 Note the order of arguments (self, target) is the reverse of os.link's.
1427 """
1428 os.link(target, self)
1429 else:
1430 def hardlink_to(self, target):
1431 """

Callers 2

test_hardlink_toMethod · 0.80

Calls 1

Tested by 2

test_hardlink_toMethod · 0.64