rsync

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2015 License: Apache-2.0 Imports: 2 Imported by: 14

Documentation

Overview

Package rsync provides a wrapper around the fast rsync file copying tool.

Index

Constants

This section is empty.

Variables

View Source
var DefaultClient = &Client{}

DefaultClient is a usable rsync client without any options enabled.

View Source
var MirrorClient = &Client{
	Archive:  true,
	Delete:   true,
	Compress: true,
}

MirrorClient is an rsync client configured to mirror files and directories.

Functions

This section is empty.

Types

type Client

type Client struct {
	// Archive, if true, enables archive mode.
	Archive bool

	// Delete, if true, deletes extraneous files from destination directories.
	Delete bool

	// Compress, if true, compresses file data during the transfer.
	Compress bool

	// Verbose, if true, increases rsync's verbosity.
	Verbose bool

	// Exclude contains files to be excluded from the transfer.
	Exclude []string

	// RemoteShell specifies the remote shell to use, e.g. ssh.
	RemoteShell string

	// RemoteHost specifies the remote host to copy files to/from.
	RemoteHost string

	// Additional options.
	Options []string
}

A Client is an rsync client. It allows you to copy files from one location to another using rsync and supports the tool's most useful command-line options.

func (Client) Command added in v0.3.0

func (c Client) Command(dst string, src ...string) ([]string, error)

Command returns the rsync command that will be executed by Copy.

func (Client) Copy

func (c Client) Copy(dst string, src ...string) error

Copy uses rsync to copy one or more src files to dst.

Jump to

Keyboard shortcuts

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