Documentation ¶
Overview ¶
Package scp implements the Secure Copy (SCP) client protocol.
Index ¶
- Constants
- type Client
- func (c *Client) Read(name string, w io.Writer) (os.FileInfo, error)
- func (c *Client) ReadFile(src, dst string) error
- func (c *Client) Send(r io.Reader, name string, size int64, mode os.FileMode) error
- func (c *Client) SendFile(src, dst string) error
- func (c *Client) SendWithTime(r io.Reader, name string, size int64, mode os.FileMode, modTime time.Time) error
- type ProtocolError
Constants ¶
View Source
const DefaultBinary = "scp"
DefaultBinary is the default name of the scp binary.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { // Binary is the path to the scp binary. Binary string // Timeout is the timeout for the copy action. Timeout time.Duration // contains filtered or unexported fields }
Client implements the SCP client protocol.
func New ¶
func New(c *secureshell.Client) *Client
func (*Client) ReadFile ¶
ReadFile reads a single remote file src and copies its contents to a local file dst. The time and mode attributes are copied from the remote file.
type ProtocolError ¶
func (ProtocolError) Error ¶
func (err ProtocolError) Error() string
Click to show internal directories.
Click to hide internal directories.