mountlib

package
v1.54.4 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2020 License: MIT Imports: 26 Imported by: 0

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

func AddFlags(flagSet *pflag.FlagSet)

AddFlags adds the non filing system specific flags to the command

func AddRc

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

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

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

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

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
}

Options for creating the mount

type UnmountFn

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