MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / recreate_symlink

Function recreate_symlink

atomic-repository/src/repository/sandbox.rs:416–419  ·  view source on GitHub ↗
(src: &Path, dest: &Path)

Source from the content-addressed store, hash-verified

414/// Unix has a dedicated definition; everything else falls back below.
415#[cfg(unix)]
416fn recreate_symlink(src: &Path, dest: &Path) -> std::io::Result<()> {
417 let link_target = std::fs::read_link(src)?;
418 std::os::unix::fs::symlink(link_target, dest)
419}
420
421/// Non-Unix fallback: symlink creation needs special privileges, so copy the
422/// file the link resolves to (correct content-wise).

Callers 1

provision_working_treeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected