Lookup should find a direct child of a directory by the child's name. If the entry does not exist, it should return ENOENT and optionally set a NegativeTimeout in `out`. If it does exist, it should return attribute data in `out` and return the Inode for the child. A new inode can be created using `
(ctx context.Context, name string, out *fuse.EntryOut)
| 189 | // children in directories. Hence, they also return *Inode and must |
| 190 | // populate their fuse.EntryOut arguments. |
| 191 | func (n *Node) Lookup(ctx context.Context, name string, out *fuse.EntryOut) (inode *fusefs.Inode, errno syscall.Errno) { |
| 192 | defer log.Trace(n, "name=%q", name)("inode=%v, attr=%v, errno=%v", &inode, &out, &errno) |
| 193 | vfsNode, errno := n.lookupVfsNodeInDir(name) |
| 194 | if errno != 0 { |
| 195 | return nil, errno |
| 196 | } |
| 197 | newNode := newNode(n.fsys, vfsNode) |
| 198 | |
| 199 | // FIXME |
| 200 | // out.SetEntryTimeout(dt time.Duration) |
| 201 | // out.SetAttrTimeout(dt time.Duration) |
| 202 | n.fsys.setEntryOut(vfsNode, out) |
| 203 | |
| 204 | return n.NewInode(ctx, newNode, fusefs.StableAttr{Mode: out.Attr.Mode}), 0 |
| 205 | } |
| 206 | |
| 207 | var _ = (fusefs.NodeLookuper)((*Node)(nil)) |
| 208 |
nothing calls this directly
no test coverage detected