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

Method put_file_index

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

902 }
903
904 fn put_file_index(
905 &mut self,
906 path: &str,
907 mtime_secs: i64,
908 mtime_nanos: u32,
909 file_size: u64,
910 content_hash: &Hash,
911 ) -> Result<(), PristineError> {
912 let value = encode_file_index(mtime_secs, mtime_nanos, file_size, content_hash);
913 let mut table = self.txn.open_table(FILE_INDEX)?;
914 table.insert(path, &value)?;
915 Ok(())
916 }
917
918 fn del_file_index(&mut self, path: &str) -> Result<(), PristineError> {
919 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