Make the target path a hard link pointing to this path. Note this function does not make this path a hard link to *target*, despite the implication of the function and argument names. The order of arguments (target, link) is the reverse of Path.symlink_to, but
(self, target)
| 1208 | os.link(target, self) |
| 1209 | |
| 1210 | def link_to(self, target): |
| 1211 | """ |
| 1212 | Make the target path a hard link pointing to this path. |
| 1213 | |
| 1214 | Note this function does not make this path a hard link to *target*, |
| 1215 | despite the implication of the function and argument names. The order |
| 1216 | of arguments (target, link) is the reverse of Path.symlink_to, but |
| 1217 | matches that of os.link. |
| 1218 | |
| 1219 | Deprecated since Python 3.10 and scheduled for removal in Python 3.12. |
| 1220 | Use `hardlink_to()` instead. |
| 1221 | """ |
| 1222 | warnings.warn("pathlib.Path.link_to() is deprecated and is scheduled " |
| 1223 | "for removal in Python 3.12. " |
| 1224 | "Use pathlib.Path.hardlink_to() instead.", |
| 1225 | DeprecationWarning, stacklevel=2) |
| 1226 | self.__class__(target).hardlink_to(self) |
| 1227 | |
| 1228 | # Convenience functions for querying the stat results |
| 1229 |
nothing calls this directly
no test coverage detected