This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Support creating hardlink using `pathlib`
Type: enhancement Stage: resolved
Components: Library (Lib) Versions: Python 3.8
process
Status: closed Resolution: duplicate
Dependencies: Superseder: Implement pathlib.Path.link (Using os.link)
View: 26978
Assigned To: Nosy List: cool-RR, pitrou, shura_zam, xtreak
Priority: normal Keywords:

Created on 2016-11-04 07:54 by cool-RR, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (4)
msg330573 - (view) Author: Alexandr Zamaraev (shura_zam) Date: 2018-11-28 05:47
see https://python-forum.io/Thread-makin-hardlinks-with-pathlib-Path?pid=57399#pid57399
msg330674 - (view) Author: Karthikeyan Singaravelan (xtreak) * (Python committer) Date: 2018-11-29 10:05
Just to add to this os.link supports path-like objects. Adding @pitrou to take a call on this.
msg330809 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2018-11-30 17:05
Since Path already supports symlinking, it would be reasonable to add hardlinking (e.g. as `Path.link_to`).  But as you said one may as well call `os.link(path1, path2)`.
msg341108 - (view) Author: Karthikeyan Singaravelan (xtreak) * (Python committer) Date: 2019-04-29 18:03
Closing this as a duplicate of issue26978 which has an open PR with comments from @pitrou.

Thanks
History
Date User Action Args
2022-04-11 14:58:39adminsetgithub: 72794
2019-04-29 18:03:12xtreaksetstatus: open -> closed
superseder: Implement pathlib.Path.link (Using os.link)
messages: + msg341108

resolution: duplicate
stage: resolved
2018-11-30 17:05:50pitrousetmessages: + msg330809
2018-11-29 10:05:14xtreaksetnosy: + xtreak, pitrou

messages: + msg330674
versions: + Python 3.8, - Python 3.7
2018-11-28 05:47:02shura_zamsetmessages: + msg330573
2018-11-28 05:46:03shura_zamsetnosy: + shura_zam
2016-11-04 07:54:44cool-RRcreate