MCPcopy Index your code
hub / github.com/ipython/ipython / link

Function link

IPython/utils/path.py:286–300  ·  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

284ENOLINK = 1998
285
286def link(src, dst):
287 """Hard links ``src`` to ``dst``, returning 0 or errno.
288
289 Note that the special errno ``ENOLINK`` will be returned if ``os.link`` isn't
290 supported by the operating system.
291 """
292
293 if not hasattr(os, "link"):
294 return ENOLINK
295 link_errno = 0
296 try:
297 os.link(src, dst)
298 except OSError as e:
299 link_errno = e.errno
300 return link_errno
301
302
303def link_or_copy(src, dst):

Callers 1

link_or_copyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…