You are viewing an older version (9.12.0). Go to latest (9.13.0)
{ } Raw JSON

bundles / IPython 9.12.0 / IPython / utils / path / link_or_copy

function

IPython.utils.path:link_or_copy

source: /IPython/utils/path.py :303

Signature

def   link_or_copy ( src dst )

Summary

Attempts to hardlink src to dst, copying if the link fails.

Extended Summary

Attempts to maintain the semantics of shutil.copy.

Because os.link does not overwrite files, a unique temporary file will be used if the target already exists, then that file will be moved into place.

Aliases

  • IPython.utils.path.link_or_copy