Categorygithub.com/zegl/fuse
modulepackage
0.1.1
Repository: https://github.com/zegl/fuse.git
Documentation: pkg.go.dev

# README

bazil.org/fuse -- Filesystems in Go

This fork has support for FUSE on Mac. MacFUSE 4.0.0 and 3.3 (or newer) are supported.

The original project dropped support for FUSE on Mac when OSXFUSE stopped being an open source project bazil/fuse#224. I respect the maintainers decisions of both projects.

In this fork, the following patches to remove support for OSXFUSE have been dropped:

  • 60eaf8 - Remove macOS support
  • eca21f - Comment cleanup after macOS support removal

After forking, a patch to introduce support for macFUSE 4 has been made #1.

To use this fork in your project: go get github.com/zegl/fuse


bazil.org/fuse is a Go library for writing FUSE userspace filesystems.

It is a from-scratch implementation of the kernel-userspace communication protocol, and does not use the C library from the project called FUSE. bazil.org/fuse embraces Go fully for safety and ease of programming.

Here’s how to get going:

go get bazil.org/fuse

Website: http://bazil.org/fuse/

Github repository: https://github.com/bazil/fuse

API docs: http://godoc.org/bazil.org/fuse

Our thanks to Russ Cox for his fuse library, which this project is based on.

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Package syscallx provides wrappers that make syscalls on various platforms more interoperable.

# Functions

AllowDev enables interpreting character or block special devices on the filesystem.
AllowNonEmptyMount allows the mounting over a non-empty directory.
AllowOther allows other users to access the file system.
AllowSUID allows set-user-identifier or set-group-identifier bits to take effect.
AppendDirent appends the encoded form of a directory entry to data and returns the resulting slice.
AsyncRead enables multiple outstanding read requests for the same handle.
CongestionThreshold sets the number of outstanding background FUSE requests beyond which the kernel considers the filesystem congested.
DaemonTimeout sets the time in seconds between a request and a reply before the FUSE mount is declared dead.
DefaultPermissions makes the kernel enforce access control based on the file mode (as in chmod).
ExclCreate causes O_EXCL flag to be set for only "truly" exclusive creates, i.e.
FSName sets the file system name (also called source) that is visible in the list of mounted file systems.
LocalVolume sets the volume to be local (instead of network), changing the behavior of Finder, Spotlight, and such.
LockingFlock enables flock-based (BSD) locking.
LockingPOSIX enables flock-based (BSD) locking.
MaxBackground sets the maximum number of FUSE requests the kernel will submit in the background.
MaxReadahead sets the number of bytes that can be prefetched for sequential reads.
Mount mounts a new FUSE connection on the named directory and returns a connection for reading and writing FUSE messages.
NoAppleDouble makes OSXFUSE disallow files with names used by OS X to store extended attributes on file systems that do not support them natively.
NoAppleXattr makes OSXFUSE disallow extended attributes with the prefix "com.apple.".
NoBrowse makes OSXFUSE mark the volume as non-browsable, so that Finder won't automatically browse it.
OSXFUSELocations sets where to look for OSXFUSE files.
ReadOnly makes the mount read-only.
Subtype sets the subtype of the mount.
ToErrno converts arbitrary errors to Errno.
Unmount tries to unmount the filesystem mounted at dir.
VolumeName sets the volume name shown in Finder.
WritebackCache enables the kernel to buffer writes before sending them to the FUSE server.

# Constants

DefaultErrno is the errno used when error returned does not implement ErrorNumber.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Deprecated: Return a syscall.Errno directly.
EINTR indicates request was interrupted by an InterruptRequest.
Deprecated: Return a syscall.Errno directly.
No description provided by the author
Deprecated: Return a syscall.Errno directly.
ENOSYS indicates that the call is not supported.
Deprecated: Return a syscall.Errno directly.
Deprecated: Return a syscall.Errno directly.
Deprecated: Return a syscall.Errno directly.
ErrNoXattr is a platform-independent error value meaning the extended attribute was not found.
ESTALE is used by Serve to respond to violations of the FUSE protocol.
Indicates the handle is valid.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
OS X only.
Do not mask file access modes with umask.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
OS X only.
No description provided by the author
OS X only.
BSD-style flock lock (not POSIX lock).
No description provided by the author
No description provided by the author
No description provided by the author
OpenAccessModeMask is a bitmask that separates the access mode from the other flags in OpenFlags.
File was opened in append-only mode, all writes will go to end of file.
Flags that can be seen in OpenRequest.Flags.
bypass page cache for this open file.
Flags that can be seen in OpenRequest.Flags.
Flags that can be seen in OpenRequest.Flags.
don't invalidate the data cache on open.
Flags that can be seen in OpenRequest.Flags.
mark the file as non-seekable (not supported on OS X or FreeBSD).
OS X.
OS X.
Access modes.
Flags that can be seen in OpenRequest.Flags.
Flags that can be seen in OpenRequest.Flags.
Flags that can be seen in OpenRequest.Flags.
Flags that can be seen in OpenRequest.Flags.
No description provided by the author
No description provided by the author
No description provided by the author
PollInvalid doesn't seem to be used in the FUSE protocol.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
PollScheduleNotify requests that a poll notification is done once the node is ready.
No description provided by the author
No description provided by the author
LockOwner field is valid.
No description provided by the author
No description provided by the author
The RootID identifies the root directory of a FUSE file system.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
OS X only.
No description provided by the author
No description provided by the author
No description provided by the author
http://www.mail-archive.com/[email protected]/msg27852.html.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
LockOwner field is valid.

# Variables

Debug is called to output debug messages, including protocol traces.
No description provided by the author
No description provided by the author
ErrOSXFUSENotFound is returned from Mount when the OSXFUSE installation is not detected.
Default paths for OSXFUSE.
Default paths for OSXFUSE.

# Structs

An AccessRequest asks whether the file can be accessed for the purpose specified by the mask.
An Attr is the metadata for a single file or directory.
No description provided by the author
No description provided by the author
A Conn represents a connection to a mounted FUSE file system.
A CreateRequest asks to create and open a file (not a directory).
A CreateResponse is the response to a CreateRequest.
A DestroyRequest is sent by the kernel when unmounting the file system.
A Dirent represents a single directory entry.
An ExchangeDataRequest is a request to exchange the contents of two files, while leaving most metadata untouched.
No description provided by the author
A FlushRequest asks for the current state of an open file to be flushed to storage, as when a file descriptor is being closed.
A ForgetRequest is sent by the kernel when forgetting about r.Node as returned by r.N lookup requests.
No description provided by the author
A GetattrRequest asks for the metadata for the file denoted by r.Node.
A GetattrResponse is the response to a GetattrRequest.
A GetxattrRequest asks for the extended attributes associated with r.Node.
A GetxattrResponse is the response to a GetxattrRequest.
A Header describes the basic information sent in every request.
An InterruptRequest is a request to interrupt another pending request.
A LinkRequest is a request to create a hard link.
A ListxattrRequest asks to list the extended attributes associated with r.Node.
A ListxattrResponse is the response to a ListxattrRequest.
LockRequest asks to try acquire a byte range lock on a node.
A LookupRequest asks to look up the given name in the directory named by r.Node.
A LookupResponse is the response to a LookupRequest.
A MkdirRequest asks to create (but not open) a directory.
A MkdirResponse is the response to a MkdirRequest.
No description provided by the author
MountpointDoesNotExistError is an error returned when the mountpoint does not exist.
NotifyReply is a response to an earlier notification.
No description provided by the author
No description provided by the author
An OpenRequest asks to open a file or directory.
A OpenResponse is the response to a OpenRequest.
OSXFUSEPaths describes the path used by an installed OSXFUSE version.
No description provided by the author
No description provided by the author
No description provided by the author
Protocol is a FUSE protocol version number.
QueryLockRequest queries the lock status.
No description provided by the author
A ReadlinkRequest is a request to read a symlink's target.
A ReadRequest asks to read from an open file.
A ReadResponse is the response to a ReadRequest.
A ReleaseRequest asks to release (close) an open file handle.
A RemoveRequest asks to remove a file or directory from the directory r.Node.
A RemovexattrRequest asks to remove an extended attribute associated with r.Node.
A RenameRequest is a request to rename a file.
A SetattrRequest asks to change one or more attributes associated with a file, as indicated by Valid.
A SetattrResponse is the response to a SetattrRequest.
A SetxattrRequest asks to set an extended attribute associated with a file.
A StatfsRequest requests information about the mounted file system.
A StatfsResponse is the response to a StatfsRequest.
A SymlinkRequest is a request to create a symlink making NewName point to Target.
A SymlinkResponse is the response to a SymlinkRequest.
No description provided by the author
A WriteRequest asks to write to an open file.
A WriteResponse replies to a write indicating how many bytes were written.

# Interfaces

An ErrorNumber is an error with a specific error number.
A Request represents a single FUSE request received from the kernel.

# Type aliases

Type of an entry in a directory listing.
Errno implements Error and ErrorNumber using a syscall.Errno.
GetattrFlags are bit flags that can be seen in GetattrRequest.
A HandleID is a number identifying an open directory or file.
The InitFlags are used in the Init exchange.
The LockFlags are passed in LockRequest or LockWaitRequest.
LockOwner is a file-local opaque identifier assigned by the kernel to identify the owner of a particular lock.
No description provided by the author
LockWaitRequest asks to acquire a byte range lock on a node, delaying response until lock can be obtained (or the request is interrupted).
MountOption is passed to Mount to change the behavior of the mount.
A NodeID is a number identifying a directory or file.
OpenFlags are the O_FOO flags passed to open/create/etc calls.
The OpenResponseFlags are returned in the OpenResponse.
No description provided by the author
PollFlags are passed in PollRequest.Flags.
The ReadFlags are passed in ReadRequest.
The ReleaseFlags are used in the Release exchange.
A RequestID identifies an active FUSE request.
The SetattrValid are bit flags describing which fields in the SetattrRequest are included in the change.
UnlockRequest asks to release a lock on a byte range on a node.
The WriteFlags are passed in WriteRequest.