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

Function recreate_symlink

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

Source from the content-addressed store, hash-verified

393/// Unix has a dedicated definition; everything else falls back below.
394#[cfg(unix)]
395fn recreate_symlink(src: &Path, dest: &Path) -> std::io::Result<()> {
396 let link_target = std::fs::read_link(src)?;
397 std::os::unix::fs::symlink(link_target, dest)
398}
399
400/// Non-Unix fallback: symlink creation needs special privileges, so copy the
401/// 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