Commit 2d41aad8 authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

nodefs: add Inode.IsDir

parent a5b08ac7
...@@ -96,6 +96,10 @@ type Inode struct { ...@@ -96,6 +96,10 @@ type Inode struct {
parents map[parentData]struct{} parents map[parentData]struct{}
} }
func (n *Inode) IsDir() bool {
return n.nodeAttr.Mode&syscall.S_IFDIR != 0
}
func (n *Inode) embed() *Inode { func (n *Inode) embed() *Inode {
return n return n
} }
......
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