easysftp: github.com/tblyler/easysftp Index | Files

package easysftp

import "github.com/tblyler/easysftp"

Index

Package Files

easysftp.go

type Client Uses

type Client struct {
    // contains filtered or unexported fields
}

Client communicates with the SFTP to download files/pathes

func Connect Uses

func Connect(config *ClientConfig) (*Client, error)

Connect to a host with this given config

func (*Client) Close Uses

func (c *Client) Close() error

Close the underlying SSH conection

func (*Client) Download Uses

func (c *Client) Download(path string, output io.Writer, offset int64) error

Download a file from the given path to the output writer with the given offset of the remote file

func (*Client) Lstat Uses

func (c *Client) Lstat(path string) (os.FileInfo, error)

Lstat gets information for the given path, if it is a symbolic link, it will describe the symbolic link

func (*Client) Mirror Uses

func (c *Client) Mirror(path string, localParentPath string, resume bool) error

Mirror downloads an entire folder (recursively) or file underneath the given localParentPath resume will try to continue downloading interrupted files

func (*Client) Stat Uses

func (c *Client) Stat(path string) (os.FileInfo, error)

Stat gets information for the given path

type ClientConfig Uses

type ClientConfig struct {
    Username string
    Host     string
    KeyPath  string
    Password string
    Timeout  time.Duration
    FileMode os.FileMode
}

ClientConfig maintains all of the configuration info to connect to a SSH host

Package easysftp imports 8 packages (graph). Updated 2016-08-01. Refresh now. Tools for package owners. This is an inactive package (no imports and no commits in at least two years).