filesystem

package
v0.0.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 27, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package filesystem provides a FUSE filesystem that can be used to mount a fake library to a particular filesystem path.

Typical Usage:

lib, err := library.New(...)
if err != nil {
    ...
}

server, err := filesystem.Mount(lib, dir, nil)
if err != nil {
    ...
}

// use the files mounted in `dir`.

server.Unmount()

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Mount

func Mount(lib *library.Library, dir string, options *fs.Options) (*fuse.Server, error)

Mount mounts the given library into `dir`. `options` can be used to supply additional FUSE mount options. If the default options are OK, then `nil` can safely be provided for `options`. The FUSE server runs in a separate goroutine. This function does not block. The `Unmount` method of the returned server can be used to unmount the filesystem. See the go-fuse docs for details.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL