rclone: github.com/ncw/rclone/cmd/mountlib Index | Files

package mountlib

import "github.com/ncw/rclone/cmd/mountlib"


Package Files

daemon_unix.go mount.go rc.go


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

Global constants


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

var (
    Opt = DefaultOpt

Options set by command line flags

func AddFlags Uses

func AddFlags(flagSet *pflag.FlagSet)

AddFlags adds the non filing system specific flags to the command

func AddRc Uses

func AddRc(mountUtilName string, mountFunction MountFn)

AddRc adds mount and unmount functionality to rc

func ClipBlocks Uses

func ClipBlocks(b *uint64)

ClipBlocks clips the blocks pointed to the OS max

func Mount Uses

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 Uses

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

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

type MountFn Uses

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 Uses

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 Uses

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 Uses

type UnmountFn func() error

UnmountFn is called to unmount the file system

Package mountlib imports 26 packages (graph) and is imported by 8 packages. Updated 2020-08-03. Refresh now. Tools for package owners.