ftp

package
v1.9.87 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FResponse

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

FResponse #

func (*FResponse) Close

func (r *FResponse) Close() error

Close #

func (*FResponse) Read

func (r *FResponse) Read(buf []byte) (int, error)

Read #

func (*FResponse) SetDeadline

func (r *FResponse) SetDeadline(t time.Time) error

SetDeadline #

type FileInfo

type FileInfo struct {
	Name    string
	Size    int64
	Type    string
	ModTime time.Time
}

FileInfo #

func (*FileInfo) IsDir

func (f *FileInfo) IsDir() bool

IsDir #

func (*FileInfo) STime

func (f *FileInfo) STime() string

STime #

type Ftp

type Ftp struct {
	Timeout int
	Host    string
	// contains filtered or unexported fields
}

Ftp #

func Connect

func Connect(conStr string, timeout int) (*Ftp, error)

Connect #

func DialFtp

func DialFtp(addr string, timeout int) (*Ftp, error)

DialFtp #

func (*Ftp) GetFile

func (f *Ftp) GetFile(srcFile string, dstFile string) error

GetFile #

func (*Ftp) ListFiles

func (f *Ftp) ListFiles(path string) (*[]FileInfo, error)

ListFiles #with MLSD

func (*Ftp) Login

func (f *Ftp) Login(user, pwd string) error

Login #

func (*Ftp) Quit

func (f *Ftp) Quit() error

Quit #

func (*Ftp) Retr

func (f *Ftp) Retr(path string) (*FResponse, error)

Retr #

Jump to

Keyboard shortcuts

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