ftp

package
v7.9.0 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(cfg *config.ServerFTP) (*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() config.ServerCommon

Common return common configuration

func (*Client) ReadDir

func (c *Client) ReadDir(dir 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