ftp

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2021 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FtpDownloader

type FtpDownloader struct {
}

func (*FtpDownloader) Browse

func (ftpDownloader *FtpDownloader) Browse(destination *models.ParsedDestination) ([]*models.RemoteFile, error)

Browse a files list in the server directory

func (*FtpDownloader) Download

func (ftpDownloader *FtpDownloader) Download(remoteFile *models.RemoteFile) (*models.RemoteFileContent, error)

Download the file. Get Blob io.ReadCloser

func (*FtpDownloader) Remove added in v1.1.2

func (ftpDownloader *FtpDownloader) Remove(remoteFile *models.RemoteFile) error

func (*FtpDownloader) Stat

func (ftpDownloader *FtpDownloader) Stat(destination *models.ParsedDestination) (*models.RemoteFile, error)

type IFtpClient

type IFtpClient interface {
	ReadDir(destination string) ([]os.FileInfo, error)
	Retrieve(filePath string, dest io.Writer) error
	Delete(path string) error
	Rmdir(path string) error
	Stat(path string) (os.FileInfo, error)
}

Jump to

Keyboard shortcuts

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