@@ -1315,12 +1315,6 @@ def lstat(self):
13151315 """
13161316 return self .stat (follow_symlinks = False )
13171317
1318- def link_to (self , target ):
1319- """
1320- Create a hard link pointing to a path named target.
1321- """
1322- self ._accessor .link (self , target )
1323-
13241318 def rename (self , target ):
13251319 """
13261320 Rename this path to the target path.
@@ -1349,11 +1343,23 @@ def replace(self, target):
13491343
13501344 def symlink_to (self , target , target_is_directory = False ):
13511345 """
1352- Make this path a symlink pointing to the given path.
1353- Note the order of arguments (self , target) is the reverse of os.symlink's .
1346+ Make this path a symlink pointing to the target path.
1347+ Note the order of arguments (link , target) is the reverse of os.symlink.
13541348 """
13551349 self ._accessor .symlink (target , self , target_is_directory )
13561350
1351+ def link_to (self , target ):
1352+ """
1353+ Make the target path a hard link pointing to this path.
1354+
1355+ Note this function does not make this path a hard link to *target*,
1356+ despite the implication of the function and argument names. The order
1357+ of arguments (target, link) is the reverse of Path.symlink_to, but
1358+ matches that of os.link.
1359+
1360+ """
1361+ self ._accessor .link (self , target )
1362+
13571363 # Convenience functions for querying the stat results
13581364
13591365 def exists (self ):
0 commit comments