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

Method put_file_index

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

1997 }
1998
1999 fn put_file_index(
2000 &mut self,
2001 path: &str,
2002 mtime_secs: i64,
2003 mtime_nanos: u32,
2004 file_size: u64,
2005 content_hash: &Hash,
2006 ) -> Result<(), PristineError> {
2007 let value = encode_file_index(mtime_secs, mtime_nanos, file_size, content_hash);
2008 let mut table = self.txn.open_table(FILE_INDEX)?;
2009 table.insert(path, &value)?;
2010 Ok(())
2011 }
2012
2013 fn del_file_index(&mut self, path: &str) -> Result<(), PristineError> {
2014 let mut table = self.txn.open_table(FILE_INDEX)?;

Calls 2

encode_file_indexFunction · 0.85
insertMethod · 0.45