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

Update documentation for a bit.

parent 9ec4c8af
......@@ -11,6 +11,13 @@ negligible.
* Supports in-process mounting of different FileSystems onto
subdirectories of the FUSE mount.
* Supports 3 interfaces for writing filesystems:
- PathFileSystem: define filesystems in terms path names
- NodeFileSystem: define filesystems in terms of inodes.
NodeFileSystem allow true hardlinks.
- RawFileSystem: define filesystems in terms of FUSE's raw
wire protocol.
* Includes two fleshed out examples, zipfs and unionfs.
......
// The fuse package provides APIs to implement filesystems in
// userspace, using libfuse on Linux.
// userspace, using libfuse on Linux. Typically, each call of the API
// happens in its own goroutine, so take care to make the file system
// thread-safe.
package fuse
import (
......@@ -8,6 +11,11 @@ import (
// Types for users to implement.
// NodeFileSystem is a high level API that resembles the kernel's idea
// of what an FS looks like. NodeFileSystems can have multiple
// hard-links to one file, for example. It is also suited if the data
// to represent fits in memory: you can construct FsNode at mount
// time, and the filesystem will be ready.
type NodeFileSystem interface {
Unmount()
Mount(conn *FileSystemConnector)
......@@ -58,7 +66,6 @@ type FsNode interface {
Utimens(file File, atime uint64, mtime uint64, context *Context) (code Status)
}
// A filesystem API that uses paths rather than inodes. A minimal
// file system should have at least a functional GetAttr method.
// Typically, each call happens in its own goroutine, so take care to
......@@ -146,7 +153,7 @@ type WithFlags struct {
Flags uint32
}
// MountOptions contains time out options for a FileSystem. The
// MountOptions contains time out options for a (Node)FileSystem. The
// default copied from libfuse and set in NewMountOptions() is
// (1s,1s,0s).
type FileSystemOptions struct {
......@@ -181,7 +188,7 @@ type DefaultFileSystem struct{}
// DefaultFile returns ENOSYS for every operation.
type DefaultFile struct{}
// RawFileSystem is an interface closer to the FUSE wire protocol.
// RawFileSystem is an interface close to the FUSE wire protocol.
//
// Unless you really know what you are doing, you should not implement
// this, but rather the FileSystem interface; the details of getting
......
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