ftp

package
v0.0.0-...-a097be9 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(config *model.FTP) (*server.Client, error)

New creates new ftp instance

Types

type Client

type Client struct {
	*server.Client
	// contains filtered or unexported fields
}

Client represents an active ftp object

func (*Client) Close

func (c *Client) Close() error

Close closes ftp connection

func (*Client) Common

func (c *Client) Common() model.Common

Common return common configuration

func (*Client) ReadDir

func (c *Client) ReadDir(path string) ([]os.FileInfo, error)

ReadDir fetches the contents of a directory, returning a list of os.FileInfo's

func (*Client) Retrieve

func (c *Client) Retrieve(path string, dest io.Writer) error

Retrieve file "path" from server and write bytes to "dest".

Jump to

Keyboard shortcuts

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