From c9f002213e7adaf2a2b3895fd4bab9828d836fb5 Mon Sep 17 00:00:00 2001 From: Christian Ebner Date: Thu, 14 Nov 2019 17:42:17 +0100 Subject: [PATCH] src/backup/catalog.rs: impl DirEntry::is_directory() Signed-off-by: Christian Ebner --- src/backup/catalog.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/backup/catalog.rs b/src/backup/catalog.rs index 7e103306..70e997ba 100644 --- a/src/backup/catalog.rs +++ b/src/backup/catalog.rs @@ -100,6 +100,13 @@ impl DirEntry { } } } + + pub fn is_directory(&self) -> bool { + match self.attr { + DirEntryAttribute::Directory { .. } => true, + _ => false, + } + } } struct DirInfo {