add in_use method for Inode to check whether there are any hard links

This commit is contained in:
Szymon Walter 2018-03-19 20:42:27 +01:00
parent c798b2bdb2
commit 7dd27917bd

View file

@ -119,6 +119,10 @@ impl Inode {
Ok(inode)
}
pub fn in_use(&self) -> bool {
self.hard_links > 0
}
}
bitflags! {