Commit 467f4e06 authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

nodefs: add Inode.IsRoot

parent dcd0e2a9
......@@ -141,6 +141,11 @@ func (n *Inode) Root() *Inode {
return n.bridge.root
}
// Returns whether this is the root of the tree
func (n *Inode) IsRoot() bool {
return n.bridge.root == n
}
func modeStr(m uint32) string {
return map[uint32]string{
syscall.S_IFREG: "reg",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment