MCPcopy Create free account
hub / github.com/ipython/ipython / link

Function link

IPython/utils/path.py:368–382  ·  view source on GitHub ↗

Hard links ``src`` to ``dst``, returning 0 or errno. Note that the special errno ``ENOLINK`` will be returned if ``os.link`` isn't supported by the operating system.

(src, dst)

Source from the content-addressed store, hash-verified

366ENOLINK = 1998
367
368def link(src, dst):
369 """Hard links ``src`` to ``dst``, returning 0 or errno.
370
371 Note that the special errno ``ENOLINK`` will be returned if ``os.link`` isn't
372 supported by the operating system.
373 """
374
375 if not hasattr(os, "link"):
376 return ENOLINK
377 link_errno = 0
378 try:
379 os.link(src, dst)
380 except OSError as e:
381 link_errno = e.errno
382 return link_errno
383
384
385def link_or_copy(src, dst):

Callers 1

link_or_copyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected