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

Function push_path

atomic-repository/src/repository/working_copy.rs:542–546  ·  view source on GitHub ↗
(bytes: &mut Vec<u8>, path: &Path)

Source from the content-addressed store, hash-verified

540}
541
542fn push_path(bytes: &mut Vec<u8>, path: &Path) {
543 let encoded = os_path_bytes(path.as_os_str());
544 bytes.extend_from_slice(&(encoded.len() as u64).to_le_bytes());
545 bytes.extend_from_slice(&encoded);
546}
547
548#[cfg(unix)]
549fn os_path_bytes(path: &std::ffi::OsStr) -> Vec<u8> {

Callers 1

fingerprintFunction · 0.85

Calls 3

os_path_bytesFunction · 0.85
to_le_bytesMethod · 0.80
lenMethod · 0.45

Tested by

no test coverage detected