Documentation ¶
Overview ¶
Package cmd implemnts the rclone command
It is in a sub package so it's internals can be re-used elsewhere
Index ¶
- Variables
- func AtExit(fn func())
- func CheckArgs(MinArgs, MaxArgs int, cmd *cobra.Command, args []string)
- func NewFsDst(args []string) fs.Fs
- func NewFsDstFile(args []string) (fdst fs.Fs, dstFileName string)
- func NewFsSrc(args []string) fs.Fs
- func NewFsSrcDst(args []string) (fs.Fs, fs.Fs)
- func NewFsSrcDstFiles(args []string) (fsrc fs.Fs, srcFileName string, fdst fs.Fs, dstFileName string)
- func Run(Retry bool, showStats bool, cmd *cobra.Command, f func() error)
- func ShowStats() bool
- func ShowVersion()
- func StartStats() chan struct{}
Constants ¶
This section is empty.
Variables ¶
var Root = &cobra.Command{ Use: "rclone", Short: "Sync files and directories to and from local and remote object stores - " + fs.Version, Long: ` Rclone is a command line program to sync files and directories to and from various cloud storage systems and using file transfer services, such as: * Amazon Drive * Amazon S3 * Backblaze B2 * Box * Dropbox * FTP * Google Cloud Storage * Google Drive * HTTP * Hubic * Microsoft Azure Blob Storage * Microsoft OneDrive * Openstack Swift / Rackspace cloud files / Memset Memstore * pCloud * QingStor * SFTP * Webdav / Owncloud / Nextcloud * Yandex Disk * The local filesystem Features * MD5/SHA1 hashes checked at all times for file integrity * Timestamps preserved on files * Partial syncs supported on a whole file basis * Copy mode to just copy new/changed files * Sync (one way) mode to make a directory identical * Check mode to check for file hash equality * Can sync to and from network, eg two different cloud accounts See the home page for installation, usage, documentation, changelog and configuration walkthroughs. * https://rclone.org/ `, PersistentPostRun: func(cmd *cobra.Command, args []string) { fs.Debugf("rclone", "Version %q finishing with parameters %q", fs.Version, os.Args) runAtExitFunctions() }, }
Root is the main rclone command
Functions ¶
func NewFsDst ¶
NewFsDst creates a new dst fs from the arguments
Dst fs-es can't point to single files
func NewFsDstFile ¶
NewFsDstFile creates a new dst fs with a destination file name from the arguments
func NewFsSrcDst ¶
NewFsSrcDst creates a new src and dst fs from the arguments
func NewFsSrcDstFiles ¶
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 ShowStats ¶
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 StartStats ¶
func StartStats() chan struct{}
StartStats prints the stats every statsInterval
It returns a channel which should be closed to stop the stats.
Types ¶
This section is empty.