tape: use SnapshotReader to create snapshot archive

This commit is contained in:
Dietmar Maurer
2020-12-18 12:10:31 +01:00
parent d108b610fd
commit b9ee86efe1
2 changed files with 17 additions and 11 deletions

View File

@ -25,6 +25,7 @@ use crate::{
///
/// This make it easy to iterate over all used chunks and files.
pub struct SnapshotReader {
snapshot: BackupDir,
file_list: Vec<String>,
locked_dir: Dir,
}
@ -59,7 +60,12 @@ impl SnapshotReader {
file_list.push(CLIENT_LOG_BLOB_NAME.to_string());
}
Ok(Self { file_list, locked_dir })
Ok(Self { snapshot, file_list, locked_dir })
}
/// Return the snapshot directory
pub fn snapshot(&self) -> &BackupDir {
&self.snapshot
}
/// Returns the list of files the snapshot refers to.