rclone/vendor/github.com/billziss-gh/cgofuse
Nick Craig-Wood 6427029c4e vendor: update all dependencies
* Update all dependencies
  * Remove all `[[constraint]]` from Gopkg.toml
  * Add in the minimum number of `[[override]]` to build
  * Remove go get of github.com/inconshreveable/mousetrap as it is vendored
  * Update docs with new policy on constraints
2018-05-05 15:52:24 +01:00
..
.circleci vendor: update github.com/billziss-gh/cgofuse - fixes #1481 2017-06-19 09:53:34 +01:00
examples vendor: update all dependencies to latest versions 2018-01-16 13:20:59 +00:00
fuse vendor: update all dependencies 2018-05-05 15:52:24 +01:00
.appveyor.yml vendor: update all dependencies 2018-05-05 15:52:24 +01:00
.travis.yml vendor: update all dependencies 2018-05-05 15:52:24 +01:00
Changelog.md vendor: update all dependencies 2018-05-05 15:52:24 +01:00
Dockerfile vendor: update all dependencies to latest versions 2018-01-16 13:20:59 +00:00
License.txt cmount: Vendor github.com/billziss-gh/cgofuse 2017-05-15 16:56:47 +01:00
README.md vendor: update github.com/billziss-gh/cgofuse - fixes #1481 2017-06-19 09:53:34 +01:00

Cross-platform FUSE library for Go

Travis CI
AppVeyor
CircleCI
GoDoc

Cgofuse is a cross-platform FUSE library for Go. It is implemented using cgo and can be ported to any platform that has a FUSE implementation.

Cgofuse currently runs on OSX, Linux and Windows (using WinFsp).

How to build

OSX

  • Prerequisites: OSXFUSE, command line tools
  • Build:
    $ cd cgofuse
    $ go install -v ./fuse ./examples/memfs ./examples/passthrough
    

Linux

  • Prerequisites: libfuse-dev, gcc
  • Build:
    $ cd cgofuse
    $ go install -v ./fuse ./examples/memfs ./examples/passthrough
    

Windows

  • Prerequisites: WinFsp, gcc (e.g. from Mingw-builds)
  • Build:
    > cd cgofuse
    > set CPATH=C:\Program Files (x86)\WinFsp\inc\fuse
    > go install -v ./fuse ./examples/memfs
    

How to cross-compile your project using xgo

You can easily cross-compile your project using xgo and the billziss/xgo-cgofuse docker image.

  • Prerequisites: docker, xgo
  • Build:
    $ docker pull billziss/xgo-cgofuse
    $ go get -u github.com/karalabe/xgo
    $ cd YOUR-PROJECT-THAT-USES-CGOFUSE
    $ xgo --image=billziss/xgo-cgofuse \
        --targets=darwin/386,darwin/amd64,linux/386,linux/amd64,windows/386,windows/amd64 .
    

How to use

User mode file systems are expected to implement fuse.FileSystemInterface. To make implementation simpler a file system can embed ("inherit") a fuse.FileSystemBase which provides default implementations for all operations. To mount a file system one must instantiate a fuse.FileSystemHost using fuse.NewFileSystemHost.

The full documentation is available at GoDoc.org: package fuse

There are currently three example file systems:

  • Hellofs is an extremely simple file system. Runs on OSX, Linux and Windows.
  • Memfs is an in memory file system. Runs on OSX, Linux and Windows.
  • Passthrough is a file system that passes all operations to the underlying file system. Runs on OSX, Linux.

How it is tested

Cgofuse is regularly built and tested on Travis CI and AppVeyor. The following software is being used to test cgofuse.

OSX/Linux

Windows

Contributors

  • Bill Zissimopoulos <billziss at navimatics.com>
  • Nick Craig-Wood <nick at craig-wood.com>