fusefrontend

package
v1.4.4 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2018 License: MIT Imports: 26 Imported by: 0

Documentation

Overview

Package fusefrontend interfaces directly with the go-fuse library.

Index

Constants

View Source
const FALLOC_DEFAULT = 0x00

FALLOC_DEFAULT is a "normal" fallocate operation

View Source
const FALLOC_FL_KEEP_SIZE = 0x01

FALLOC_FL_KEEP_SIZE allocates disk space while not modifying the file size

Variables

This section is empty.

Functions

func NewFile

func NewFile(fd *os.File, fs *FS) (nodefs.File, fuse.Status)

NewFile returns a new go-fuse File instance.

Types

type Args

type Args struct {
	// Cipherdir is the backing storage directory (absolute path).
	// For reverse mode, Cipherdir actually contains *plaintext* files.
	Cipherdir      string
	PlaintextNames bool
	LongNames      bool
	// Should we chown a file after it has been created?
	// This only makes sense if (1) allow_other is set and (2) we run as root.
	PreserveOwner bool
	// Should we force ownership to be presented with a given user and group?
	// This only makes sense if allow_other is set. In *most* cases, it also
	// only makes sense with PreserveOwner set, but can also make sense without
	// PreserveOwner if the underlying filesystem acting as backing store
	// enforces ownership itself.
	ForceOwner *fuse.Owner
	// ConfigCustom is true when the user select a non-default config file
	// location. If it is false, reverse mode maps ".gocryptfs.reverse.conf"
	// to "gocryptfs.conf" in the plaintext dir.
	ConfigCustom bool
	// NoPrealloc disables automatic preallocation before writing
	NoPrealloc bool
	// Try to serialize read operations, "-serialize_reads"
	SerializeReads bool
	// Force decode even if integrity check fails (openSSL only)
	ForceDecode bool
}

Args is a container for arguments that are passed from main() to fusefrontend

type FS

type FS struct {
	pathfs.FileSystem // loopbackFileSystem, see go-fuse/fuse/pathfs/loopback.go
	// contains filtered or unexported fields
}

FS implements the go-fuse virtual filesystem interface.

func NewFS

NewFS returns a new encrypted FUSE overlay filesystem.

func (*FS) Access

func (fs *FS) Access(path string, mode uint32, context *fuse.Context) (code fuse.Status)

Access implements pathfs.Filesystem.

func (*FS) Chmod

func (fs *FS) Chmod(path string, mode uint32, context *fuse.Context) (code fuse.Status)

Chmod implements pathfs.Filesystem.

func (*FS) Chown

func (fs *FS) Chown(path string, uid uint32, gid uint32, context *fuse.Context) (code fuse.Status)

Chown implements pathfs.Filesystem.

func (*FS) Create

func (fs *FS) Create(path string, flags uint32, mode uint32, context *fuse.Context) (fuseFile nodefs.File, code fuse.Status)

Create implements pathfs.Filesystem.

func (*FS) DecryptPath added in v1.2.1

func (fs *FS) DecryptPath(cipherPath string) (string, error)

DecryptPath implements ctlsock.Backend

func (*FS) EncryptPath added in v1.2.1

func (fs *FS) EncryptPath(plainPath string) (string, error)

EncryptPath implements ctlsock.Backend

func (*FS) GetAttr

func (fs *FS) GetAttr(name string, context *fuse.Context) (*fuse.Attr, fuse.Status)

GetAttr implements pathfs.Filesystem.

func (*FS) GetXAttr

func (fs *FS) GetXAttr(name string, attr string, context *fuse.Context) ([]byte, fuse.Status)

GetXAttr implements pathfs.Filesystem.

func (fs *FS) Link(oldPath string, newPath string, context *fuse.Context) (code fuse.Status)

Link implements pathfs.Filesystem.

func (*FS) ListXAttr

func (fs *FS) ListXAttr(name string, context *fuse.Context) ([]string, fuse.Status)

ListXAttr implements pathfs.Filesystem.

func (*FS) Mkdir

func (fs *FS) Mkdir(newPath string, mode uint32, context *fuse.Context) (code fuse.Status)

Mkdir implements pathfs.FileSystem

func (*FS) Mknod

func (fs *FS) Mknod(path string, mode uint32, dev uint32, context *fuse.Context) (code fuse.Status)

Mknod implements pathfs.Filesystem.

func (*FS) Open

func (fs *FS) Open(path string, flags uint32, context *fuse.Context) (fuseFile nodefs.File, status fuse.Status)

Open implements pathfs.Filesystem.

func (*FS) OpenDir

func (fs *FS) OpenDir(dirName string, context *fuse.Context) ([]fuse.DirEntry, fuse.Status)

OpenDir implements pathfs.FileSystem

func (fs *FS) Readlink(path string, context *fuse.Context) (out string, status fuse.Status)

Readlink implements pathfs.Filesystem.

func (*FS) RemoveXAttr

func (fs *FS) RemoveXAttr(name string, attr string, context *fuse.Context) fuse.Status

RemoveXAttr implements pathfs.Filesystem.

func (*FS) Rename

func (fs *FS) Rename(oldPath string, newPath string, context *fuse.Context) (code fuse.Status)

Rename implements pathfs.Filesystem.

func (*FS) Rmdir

func (fs *FS) Rmdir(path string, context *fuse.Context) (code fuse.Status)

Rmdir implements pathfs.FileSystem

func (*FS) SetXAttr

func (fs *FS) SetXAttr(name string, attr string, data []byte, flags int, context *fuse.Context) fuse.Status

SetXAttr implements pathfs.Filesystem.

func (*FS) StatFs

func (fs *FS) StatFs(path string) *fuse.StatfsOut

StatFs implements pathfs.Filesystem.

func (fs *FS) Symlink(target string, linkName string, context *fuse.Context) (code fuse.Status)

Symlink implements pathfs.Filesystem.

func (*FS) Truncate

func (fs *FS) Truncate(path string, offset uint64, context *fuse.Context) (code fuse.Status)

Truncate implements pathfs.Filesystem. Support truncate(2) by opening the file and calling ftruncate(2) While the glibc "truncate" wrapper seems to always use ftruncate, fsstress from xfstests uses this a lot by calling "truncate64" directly.

func (fs *FS) Unlink(path string, context *fuse.Context) (code fuse.Status)

Unlink implements pathfs.Filesystem.

func (*FS) Utimens

func (fs *FS) Utimens(path string, a *time.Time, m *time.Time, context *fuse.Context) (code fuse.Status)

Utimens implements pathfs.Filesystem.

Jump to

Keyboard shortcuts

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