datastore: add BackupGroup::exists helper

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller 2022-07-14 11:13:44 +02:00
parent 5444b914af
commit 487c5be9ab

View File

@ -78,6 +78,12 @@ impl BackupGroup {
path
}
/// Simple check whether a group exists. This does not check whether there are any snapshots,
/// but rather it simply checks whether the directory exists.
pub fn exists(&self) -> bool {
self.full_group_path().exists()
}
pub fn list_backups(&self) -> Result<Vec<BackupInfo>, Error> {
let mut list = vec![];