mountlib

package
v1.54.0 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2021 License: MIT Imports: 26 Imported by: 16

Documentation

Index

Constants

View Source
const (
	MaxLeafSize = 1024 // don't pass file names longer than this
)

Global constants

Variables

View Source
var DefaultOpt = Options{
	MaxReadAhead:  128 * 1024,
	AttrTimeout:   1 * time.Second,
	NoAppleDouble: true,
	NoAppleXattr:  false,
	AsyncRead:     true,
}

DefaultOpt is the default values for creating the mount

View Source
var (
	Opt = DefaultOpt
)

Options set by command line flags

Functions

func AddFlags added in v1.53.0

func AddFlags(flagSet *pflag.FlagSet)

AddFlags adds the non filing system specific flags to the command

func AddRc added in v1.52.0

func AddRc(mountUtilName string, mountFunction MountFn)

AddRc adds mount and unmount functionality to rc

func ClipBlocks

func ClipBlocks(b *uint64)

ClipBlocks clips the blocks pointed to the OS max

func Mount added in v1.53.0

func Mount(VFS *vfs.VFS, mountpoint string, mount MountFn, opt *Options) error

Mount mounts the remote at mountpoint.

If noModTime is set then it

func NewMountCommand

func NewMountCommand(commandName string, hidden bool, mount MountFn) *cobra.Command

NewMountCommand makes a mount command with the given name and Mount function

Types

type MountFn added in v1.52.0

type MountFn func(VFS *vfs.VFS, mountpoint string, opt *Options) (<-chan error, func() error, error)

MountFn is called to mount the file system

type MountInfo added in v1.53.0

type MountInfo struct {
	MountPoint string    `json:"MountPoint"`
	MountedOn  time.Time `json:"MountedOn"`
	Fs         string    `json:"Fs"`
	MountOpt   *Options
	VFSOpt     *vfscommon.Options
	// contains filtered or unexported fields
}

MountInfo defines the configuration for a mount

type Options added in v1.53.0

type Options struct {
	DebugFUSE          bool
	AllowNonEmpty      bool
	AllowRoot          bool
	AllowOther         bool
	DefaultPermissions bool
	WritebackCache     bool
	Daemon             bool
	MaxReadAhead       fs.SizeSuffix
	ExtraOptions       []string
	ExtraFlags         []string
	AttrTimeout        time.Duration // how long the kernel caches attribute for
	VolumeName         string
	NoAppleDouble      bool
	NoAppleXattr       bool
	DaemonTimeout      time.Duration // OSXFUSE only
	AsyncRead          bool
	NetworkMode        bool // Windows only
}

Options for creating the mount

type UnmountFn added in v1.52.0

type UnmountFn func() error

UnmountFn is called to unmount the file system

Jump to

Keyboard shortcuts

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