lib

package module
v2.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: BSD-3-Clause Imports: 0 Imported by: 0

README

Go-FUSE

CI GoDoc

Go native bindings for the FUSE kernel module.

Use github.com/hanwen/go-fuse/v2/fs library. It follows the wire protocol closely, but provides convenient abstractions for building both node and path based file systems

Release notes

v2.7

  • fuse, fs: support STATX

v2.6

  • general:
    • drop support for go1.16
  • fuse:
    • FreeBSD support
    • passthrough support for increased performance
    • DirEntryList.Offset and DirEntry.Off are visible now; add DirEntry.Parse
  • fs:
    • new directory API, supporting caching and file handles for Readdir and FsyncDir
    • passthrough support for increased performance
    • allow LoopbackNode to be used as non-root
    • OnForget method

v2.5

  • Support for RenameExchange on Darwin

Comparison with other FUSE libraries

Further highlights of this library is

  • Comprehensive and up to date protocol support (up to 7.12.28).

  • Performance that is competitive with libfuse.

Examples

  • example/hello/ contains a 60-line "hello world" filesystem

  • zipfs/zipfs contains a small and simple read-only filesystem for zip and tar files. The corresponding command is in example/zipfs/ For example,

    mkdir /tmp/mountpoint
    example/zipfs/zipfs /tmp/mountpoint file.zip &
    ls /tmp/mountpoint
    fusermount -u /tmp/mountpoint
    
  • zipfs/multizipfs shows how to use combine simple Go-FUSE filesystems into a larger filesystem.

  • example/loopback mounts another piece of the filesystem. Functionally, it is similar to a symlink. A binary to run is in example/loopback/ . For example

    mkdir /tmp/mountpoint
    example/loopback/loopback -debug /tmp/mountpoint /some/other/directory &
    ls /tmp/mountpoint
    fusermount -u /tmp/mountpoint
    

macOS Support

The main developer (hanwen@) does not own a Mac to test, but accepts patches to make Go-FUSE work on Mac.

  • All of the limitations of OSXFUSE, including lack of support for NOTIFY.

  • OSX issues STATFS calls continuously (leading to performance concerns).

  • OSX has trouble with concurrent reads from the FUSE device, leading to performance concerns.

  • Tests are expected to pass; report any failure as a bug!

Credits

Bugs

Report them through https://github.com/hanwen/go-fuse/issues. Please include a debug trace (set fuse.MountOptions.Debug to true).

License

Like Go, this library is distributed under the new BSD license. See accompanying LICENSE file.

Documentation

Overview

This is a repository containing Go bindings for writing FUSE file systems.

Go to https://godoc.org/github.com/hanwen/go-fuse/fs for the in-depth documentation for this library.

Older, deprecated APIs are available at https://godoc.org/github.com/hanwen/go-fuse/fuse/pathfs and https://godoc.org/github.com/hanwen/go-fuse/fuse/nodefs.

Directories

Path Synopsis
example
benchmark-read-throughput
readbench is a benchmark helper for measuring throughput on single-file reads out of a FUSE filesystem.
readbench is a benchmark helper for measuring throughput on single-file reads out of a FUSE filesystem.
hello
This program is the analogon of libfuse's hello.c, a a program that exposes a single file "file.txt" in the root directory.
This program is the analogon of libfuse's hello.c, a a program that exposes a single file "file.txt" in the root directory.
loopback
This is main program driver for the loopback filesystem from github.com/hanwen/go-fuse/fs/, a filesystem that shunts operations to an underlying file system.
This is main program driver for the loopback filesystem from github.com/hanwen/go-fuse/fs/, a filesystem that shunts operations to an underlying file system.
multizip
This is main program driver for MultiZipFs from github.com/hanwen/go-fuse/zipfs, a filesystem for mounting multiple read-only archives.
This is main program driver for MultiZipFs from github.com/hanwen/go-fuse/zipfs, a filesystem for mounting multiple read-only archives.
statfs
statfs is a main driver for the file system from github.com/hanwen/go-fuse/benchmark, intended for benchmarking FUSE libraries.
statfs is a main driver for the file system from github.com/hanwen/go-fuse/benchmark, intended for benchmarking FUSE libraries.
winfs
This is main program driver for a loopback filesystem that emulates windows semantics (no delete/rename on opened files.)
This is main program driver for a loopback filesystem that emulates windows semantics (no delete/rename on opened files.)
zipfs
This is main program driver for github.com/hanwen/go-fuse/zipfs, a filesystem for mounting read-only archives.
This is main program driver for github.com/hanwen/go-fuse/zipfs, a filesystem for mounting read-only archives.
Package fs provides infrastructure to build tree-organized filesystems.
Package fs provides infrastructure to build tree-organized filesystems.
Package fuse provides APIs to implement filesystems in userspace in terms of raw FUSE protocol.
Package fuse provides APIs to implement filesystems in userspace in terms of raw FUSE protocol.
nodefs
This package is deprecated.
This package is deprecated.
pathfs
This package is deprecated.
This package is deprecated.
test
Package test holds the tests for Go-FUSE and is not for end-user consumption.
Package test holds the tests for Go-FUSE and is not for end-user consumption.
Package posixtest file systems for generic posix conformance.
Package posixtest file systems for generic posix conformance.

Jump to

Keyboard shortcuts

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