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

Function create_symlink

atomic-repository/src/repository/snapshot_split.rs:945–950  ·  view source on GitHub ↗
(path: &Path, bytes: &[u8])

Source from the content-addressed store, hash-verified

943
944#[cfg(unix)]
945fn create_symlink(path: &Path, bytes: &[u8]) -> Result<(), SplitSnapshotError> {
946 use std::os::unix::ffi::OsStringExt;
947 std::os::unix::fs::symlink(OsString::from_vec(bytes.to_vec()), path)
948 .map_err(RepositoryError::Io)?;
949 Ok(())
950}
951
952#[cfg(not(unix))]
953fn create_symlink(_path: &Path, _bytes: &[u8]) -> Result<(), SplitSnapshotError> {

Callers 2

write_repository_entryFunction · 0.70
replace_worktreeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected