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

Function recreate_symlink

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

Source from the content-addressed store, hash-verified

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