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

Function link_target_bytes

atomic-repository/src/repository/switch.rs:332–335  ·  view source on GitHub ↗
(path: &std::path::Path)

Source from the content-addressed store, hash-verified

330/// writes for a symlink entry.
331#[cfg(unix)]
332fn link_target_bytes(path: &std::path::Path) -> std::io::Result<Vec<u8>> {
333 use std::os::unix::ffi::OsStrExt;
334 std::fs::read_link(path).map(|target| target.as_os_str().as_bytes().to_vec())
335}
336
337#[cfg(not(unix))]
338fn link_target_bytes(path: &std::path::Path) -> std::io::Result<Vec<u8>> {

Callers 1

write_fileMethod · 0.85

Calls 1

as_bytesMethod · 0.45

Tested by

no test coverage detected