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

Function file_exists

atomic-core/src/output/crdt.rs:448–450  ·  view source on GitHub ↗

Check if a file exists in the CRDT tables.

(txn: &mut T, path: &str)

Source from the content-addressed store, hash-verified

446
447/// Check if a file exists in the CRDT tables.
448pub fn file_exists<T: MutTxnT>(txn: &mut T, path: &str) -> PristineResult<bool> {
449 Ok(txn.get_trunk_by_path(path)?.is_some())
450}
451
452/// Get the trunk ID for a file path.
453pub fn get_trunk_id<T: MutTxnT>(txn: &mut T, path: &str) -> PristineResult<Option<TrunkId>> {

Callers

nothing calls this directly

Calls 1

get_trunk_by_pathMethod · 0.45

Tested by

no test coverage detected