Commit f32523e1 authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

fs: fix NodeLookuper documentation

A spurious blank line dropped the entire doc string.

Set Size in the Lookup example

Change-Id: Idefd113f7749e8aadfc4730e38b7444f36c0e419
parent 652da3f9
...@@ -19,9 +19,11 @@ ...@@ -19,9 +19,11 @@
// // Node types should implement some file system operations, eg. Lookup // // Node types should implement some file system operations, eg. Lookup
// var _ = (fs.NodeLookuper)((*myNode)(nil)) // var _ = (fs.NodeLookuper)((*myNode)(nil))
// //
// func (n *myNode) Lookup(ctx context.Context, name string, ... ) (*Inode, syscall.Errno) { // func (n *myNode) Lookup(ctx context.Context, name string, out *fuse.EntryOut) (*Inode, syscall.Errno) {
// ops := myNode{} // ops := myNode{}
// return n.NewInode(ctx, &ops, fs.StableAttr{Mode: syscall.S_IFDIR}), 0 // out.Mode = 0755
// out.Size = 42
// return n.NewInode(ctx, &ops, fs.StableAttr{Mode: syscall.S_IFREG}), 0
// } // }
// //
// The method names are inspired on the system call names, so we have // The method names are inspired on the system call names, so we have
...@@ -399,7 +401,6 @@ type DirStream interface { ...@@ -399,7 +401,6 @@ type DirStream interface {
// example, the Symlink, Create, Mknod, Link methods all create new // example, the Symlink, Create, Mknod, Link methods all create new
// children in directories. Hence, they also return *Inode and must // children in directories. Hence, they also return *Inode and must
// populate their fuse.EntryOut arguments. // populate their fuse.EntryOut arguments.
type NodeLookuper interface { type NodeLookuper interface {
Lookup(ctx context.Context, name string, out *fuse.EntryOut) (*Inode, syscall.Errno) Lookup(ctx context.Context, name string, out *fuse.EntryOut) (*Inode, syscall.Errno)
} }
......
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