This commit is contained in:
chrislu
2022-02-12 22:21:30 -08:00
parent 661a34e23d
commit b0a5193e32
3 changed files with 25 additions and 7 deletions

View File

@@ -59,3 +59,13 @@ func (i *InodeToPath) HasPath(path util.FullPath) bool {
_, found := i.path2inode[path]
return found
}
func (i *InodeToPath) HasInode(inode uint64) bool {
if inode == 1 {
return true
}
i.RLock()
defer i.RUnlock()
_, found := i.inode2path[inode]
return found
}