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

Method put_file_index

atomic-core/src/pristine/txn/write/mod.rs:1425–1437  ·  view source on GitHub ↗
(
        &mut self,
        path: &str,
        mtime_secs: i64,
        mtime_nanos: u32,
        file_size: u64,
        content_hash: &Hash,
    )

Source from the content-addressed store, hash-verified

1423 }
1424
1425 fn put_file_index(
1426 &mut self,
1427 path: &str,
1428 mtime_secs: i64,
1429 mtime_nanos: u32,
1430 file_size: u64,
1431 content_hash: &Hash,
1432 ) -> Result<(), PristineError> {
1433 let value = encode_file_index(mtime_secs, mtime_nanos, file_size, content_hash);
1434 let mut table = self.txn.open_table(FILE_INDEX)?;
1435 table.insert(path, &value)?;
1436 Ok(())
1437 }
1438
1439 fn del_file_index(&mut self, path: &str) -> Result<(), PristineError> {
1440 let mut table = self.txn.open_table(FILE_INDEX)?;

Callers 2

update_file_indexMethod · 0.80
recordMethod · 0.80

Calls 2

encode_file_indexFunction · 0.85
insertMethod · 0.45

Tested by

no test coverage detected