rclone: github.com/rclone/rclone/cmd Index | Files | Directories

package cmd

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

Package cmd implemnts the rclone command

It is in a sub package so it's internals can be re-used elsewhere

Index

Package Files

cmd.go help.go progress.go progress_other.go siginfo_others.go

Variables

var GeneratingDocs = false

GeneratingDocs is set by rclone gendocs to alter the format of the output suitable for the documentation.

var Root = &cobra.Command{
    Use:   "rclone",
    Short: "Show help for rclone commands, flags and backends.",
    Long:  "" /* 248 byte string literal not displayed */,

    PersistentPostRun: func(cmd *cobra.Command, args []string) {
        fs.Debugf("rclone", "Version %q finishing with parameters %q", fs.Version, os.Args)
        atexit.Run()
    },
    BashCompletionFunction: bashCompletionFunc,
    DisableAutoGenTag:      true,
}

Root is the main rclone command

func AddBackendFlags Uses

func AddBackendFlags()

AddBackendFlags creates flags for all the backend options

func CheckArgs Uses

func CheckArgs(MinArgs, MaxArgs int, cmd *cobra.Command, args []string)

CheckArgs checks there are enough arguments and prints a message if not

func Main Uses

func Main()

Main runs rclone interpreting flags and commands out of os.Args

func NewFsDir Uses

func NewFsDir(args []string) fs.Fs

NewFsDir creates a new Fs from the arguments

The argument must point a directory

func NewFsDstFile Uses

func NewFsDstFile(args []string) (fdst fs.Fs, dstFileName string)

NewFsDstFile creates a new dst fs with a destination file name from the arguments

func NewFsFile Uses

func NewFsFile(remote string) (fs.Fs, string)

NewFsFile creates a Fs from a name but may point to a file.

It returns a string with the file name if points to a file otherwise "".

func NewFsSrc Uses

func NewFsSrc(args []string) fs.Fs

NewFsSrc creates a new src fs from the arguments.

The source can be a file or a directory - if a file then it will limit the Fs to a single file.

func NewFsSrcDst Uses

func NewFsSrcDst(args []string) (fs.Fs, fs.Fs)

NewFsSrcDst creates a new src and dst fs from the arguments

func NewFsSrcDstFiles Uses

func NewFsSrcDstFiles(args []string) (fsrc fs.Fs, srcFileName string, fdst fs.Fs, dstFileName string)

NewFsSrcDstFiles creates a new src and dst fs from the arguments If src is a file then srcFileName and dstFileName will be non-empty

func NewFsSrcFileDst Uses

func NewFsSrcFileDst(args []string) (fsrc fs.Fs, srcFileName string, fdst fs.Fs)

NewFsSrcFileDst creates a new src and dst fs from the arguments

The source may be a file, in which case the source Fs and file name is returned

func Run Uses

func Run(Retry bool, showStats bool, cmd *cobra.Command, f func() error)

Run the function with stats and retries if required

func ShowStats Uses

func ShowStats() bool

ShowStats returns true if the user added a `--stats` flag to the command line.

This is called by Run to override the default value of the showStats passed in.

func ShowVersion Uses

func ShowVersion()

ShowVersion prints the version to stdout

func SigInfoHandler Uses

func SigInfoHandler()

SigInfoHandler creates SigInfo handler

func StartStats Uses

func StartStats() func()

StartStats prints the stats every statsInterval

It returns a func which should be called to stop the stats.

Directories

PathSynopsis
about
allPackage all imports all the commands
authorize
cachestats
cat
check
cleanup
cmount
config
copy
copyto
copyurl
cryptcheck
cryptdecode
dbhashsum
dedupe
delete
deletefile
genautocomplete
gendocs
hashsum
info
link
listremotes
ls
lsd
lsf
lsjson
lsl
ls/lshelp
md5sum
memtest
mkdir
mount
mountlib
mountlib/mounttest
move
moveto
ncdu
ncdu/scanPackage scan does concurrent scanning of an Fs building up a directory tree.
obscure
purge
rc
rcat
rcd
reveal
rmdir
rmdirs
serve
serve/dlna
serve/dlna/data
serve/dlna/dlnaflags
serve/ftp
serve/http
serve/httplibPackage httplib provides common functionality for http servers
serve/httplib/httpflags
serve/httplib/servePackage serve deals with serving objects over HTTP
serve/httplib/serve/data
serve/proxyPackage proxy implements a programmable proxy for rclone serve
serve/proxy/proxyflagsPackage proxyflags implements command line flags to set up a proxy
serve/restic
serve/servetestPackage servetest provides infrastructure for running loopback tests of "rclone serve backend:" against the backend integration tests.
serve/sftp
serve/webdavPackage webdav implements a WebDAV server backed by rclone VFS
settier
sha1sum
size
sync
touch
tree
version

Package cmd imports 31 packages (graph) and is imported by 152 packages. Updated 2019-09-18. Refresh now. Tools for package owners.