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

Function tree_entry_kind

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

Source from the content-addressed store, hash-verified

103}
104
105pub fn tree_entry_kind(entry: &pb::TreeEntry) -> Result<ViewEntryKind, String> {
106 match pb::TreeEntryKind::try_from(entry.kind) {
107 Ok(pb::TreeEntryKind::File) => Ok(ViewEntryKind::File),
108 Ok(pb::TreeEntryKind::Directory) => Ok(ViewEntryKind::Directory),
109 Ok(pb::TreeEntryKind::Symlink) => Ok(ViewEntryKind::Symlink),
110 _ => Err(format!("entry {:?} has no kind", entry.path)),
111 }
112}
113
114/// A kernel skeleton on the wire, with `snapshot` the view's and `live` its
115/// 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