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

Function tree_entry_kind

libatomic/src/daemon/sandbox_wire.rs:110–117  ·  view source on GitHub ↗
(entry: &pb::TreeEntry)

Source from the content-addressed store, hash-verified

108}
109
110pub fn tree_entry_kind(entry: &pb::TreeEntry) -> Result<ViewEntryKind, String> {
111 match pb::TreeEntryKind::try_from(entry.kind) {
112 Ok(pb::TreeEntryKind::File) => Ok(ViewEntryKind::File),
113 Ok(pb::TreeEntryKind::Directory) => Ok(ViewEntryKind::Directory),
114 Ok(pb::TreeEntryKind::Symlink) => Ok(ViewEntryKind::Symlink),
115 _ => Err(format!("entry {:?} has no kind", entry.path)),
116 }
117}
118
119/// A kernel skeleton on the wire, with `snapshot` the view's and `live` its
120/// rendered tree (inode → path) when the caller has it.

Callers 3

materializeFunction · 0.85
materialize_prefix_intoFunction · 0.85
atomic_sandboxFunction · 0.85

Calls

no outgoing calls

Tested by 1

materialize_prefix_intoFunction · 0.68