ftp

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnConfig

type ConnConfig struct {
	Host string
	Port int
	User string
	Pass string
}

type FTP

type FTP struct {
	Connected bool
	*ftp.ServerConn
	Host string
	Port int
	User string
	Pass string
}

func New

func New(c ConnConfig) *FTP

func (*FTP) Connect

func (f *FTP) Connect() error

func (*FTP) Disconnect

func (f *FTP) Disconnect() error

func (*FTP) Download

func (f *FTP) Download(remotePath string, localPath string) error

func (*FTP) LimitByDate

func (f *FTP) LimitByDate(remoteFolder string, beforeDurationPattern string) ([]string, error)

func (*FTP) LimitByFileCount

func (f *FTP) LimitByFileCount(remoteFolder string, limit int) ([]string, error)

func (*FTP) LimitByLength

func (f *FTP) LimitByLength(remoteFolder string, limitBytes uint64) ([]string, error)

Jump to

Keyboard shortcuts

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