Documentation
¶
Overview ¶
fsnodefuse implements github.com/hanwen/go-fuse/v2/fs for fsnode.T. It's a work-in-progress. No correctness or stability is guaranteed. Or even suggested.
fsnode.Parent naturally becomes a directory. fsnode.Leaf becomes a file. Support for FUSE operations on that file depends on what Leaf.Open returns. If that fsctx.File is also
spliceio.ReaderAt: FUSE file supports concurrent, random reads and uses splices to reduce userspace <-> kernelspace memory copying. ioctx.ReaderAt: FUSE file supports concurrent, random reads. Otherwise: FUSE file supports in-order, contiguous reads only. That is, each read must start where the previous one ended. At fsctx.File EOF, file size is recorded and then overrides what fsctx.File.Stat() reports for future getattr calls, so users can see they're done reading. TODO: Decide if there's a better place for this feature.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigureDefaultMountOptions ¶
func ConfigureDefaultMountOptions(opts *fuse.MountOptions)
ConfigureDefaultMountOptions provides defaults that callers may want to start with, for performance.
func ConfigureRequiredMountOptions ¶
func ConfigureRequiredMountOptions(opts *fuse.MountOptions)
ConfigureRequiredMountOptions sets values in opts to be compatible with fsnodefuse's implementation. Users of NewRoot must use these options, and they should call this last, to make sure the required options take effect.
Types ¶
type Writable ¶
type Writable interface { WriteAt(ctx context.Context, p []byte, off int64) (n int, err error) Truncate(ctx context.Context, n int64) error // Flush is called on (FileFlusher).Flush, i.e. on the close(2) call on // a file descriptor. Implementors can assume that no writes happen // between Flush and (fsctx.File).Close. Flush(ctx context.Context) error Fsync(ctx context.Context) error }
Writable is the interface that must be implemented by files returned by (fsnode.Leaf).OpenFile to support writing.