add in_use
method for Inode
to check whether there are any hard links
This commit is contained in:
parent
c798b2bdb2
commit
7dd27917bd
|
@ -119,6 +119,10 @@ impl Inode {
|
||||||
|
|
||||||
Ok(inode)
|
Ok(inode)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn in_use(&self) -> bool {
|
||||||
|
self.hard_links > 0
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bitflags! {
|
bitflags! {
|
||||||
|
|
Reference in a new issue