src/backup/chunk_store.rs: implement cond_touch_chunk()

This will be used by backup sync to test if a chunk already exists.
This commit is contained in:
Dietmar Maurer
2020-01-02 13:26:28 +01:00
parent 1cf5178ac5
commit 2585a8a4e2
2 changed files with 17 additions and 3 deletions

View File

@ -299,6 +299,10 @@ impl DataStore {
self.chunk_store.chunk_path(digest)
}
pub fn cond_touch_chunk(&self, digest: &[u8; 32], fail_if_not_exist: bool) -> Result<bool, Error> {
self.chunk_store.cond_touch_chunk(digest, fail_if_not_exist)
}
pub fn insert_chunk(
&self,
chunk: &DataBlob,