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

Method put_file_index

atomic-core/src/pristine/txn/write/mod.rs:1541–1553  ·  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

1539 }
1540
1541 fn put_file_index(
1542 &mut self,
1543 path: &str,
1544 mtime_secs: i64,
1545 mtime_nanos: u32,
1546 file_size: u64,
1547 content_hash: &Hash,
1548 ) -> Result<(), PristineError> {
1549 let value = encode_file_index(mtime_secs, mtime_nanos, file_size, content_hash);
1550 let mut table = self.txn.open_table(FILE_INDEX)?;
1551 table.insert(path, &value)?;
1552 Ok(())
1553 }
1554
1555 fn del_file_index(&mut self, path: &str) -> Result<(), PristineError> {
1556 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