Sep-06-2018, 07:53 AM
if you trace source code of pathlib
you will see that it actively uses
So, it is possible to create hardlinks using pathlib (joke!), e.g.
you will see that it actively uses
os
module. Internally, many methods of pathlib.Path
class invokesos.<some_method>
. The latter (os), in turn, is based primarily on posixmodule.c
.So, it is possible to create hardlinks using pathlib (joke!), e.g.
import pathlib pathlib.os.link(...) # will create hard link... Unfortunately, I think, there is no way to do that the way you want.