ftp

package
v3.20.1 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2023 License: AGPL-3.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Addition

type Addition struct {
	Address  string `json:"address" required:"true"`
	Username string `json:"username" required:"true"`
	Password string `json:"password" required:"true"`
	driver.RootPath
}

type FTP

type FTP struct {
	model.Storage
	Addition
	// contains filtered or unexported fields
}

func (*FTP) Config

func (d *FTP) Config() driver.Config

func (*FTP) Copy

func (d *FTP) Copy(ctx context.Context, srcObj, dstDir model.Obj) error

func (*FTP) Drop

func (d *FTP) Drop(ctx context.Context) error

func (*FTP) GetAddition

func (d *FTP) GetAddition() driver.Additional

func (*FTP) Init

func (d *FTP) Init(ctx context.Context) error
func (d *FTP) Link(ctx context.Context, file model.Obj, args model.LinkArgs) (*model.Link, error)

func (*FTP) List

func (d *FTP) List(ctx context.Context, dir model.Obj, args model.ListArgs) ([]model.Obj, error)

func (*FTP) MakeDir

func (d *FTP) MakeDir(ctx context.Context, parentDir model.Obj, dirName string) error

func (*FTP) Move

func (d *FTP) Move(ctx context.Context, srcObj, dstDir model.Obj) error

func (*FTP) Put

func (d *FTP) Put(ctx context.Context, dstDir model.Obj, stream model.FileStreamer, up driver.UpdateProgress) error

func (*FTP) Remove

func (d *FTP) Remove(ctx context.Context, obj model.Obj) error

func (*FTP) Rename

func (d *FTP) Rename(ctx context.Context, srcObj model.Obj, newName string) error

type FTPFileReader added in v3.14.0

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

An FTP file reader that implements io.ReadSeekCloser for seeking.

func NewFTPFileReader added in v3.14.0

func NewFTPFileReader(conn *ftp.ServerConn, path string) *FTPFileReader

func (*FTPFileReader) Close added in v3.14.0

func (r *FTPFileReader) Close() error

func (*FTPFileReader) Read added in v3.14.0

func (r *FTPFileReader) Read(buf []byte) (n int, err error)

func (*FTPFileReader) Seek added in v3.14.0

func (r *FTPFileReader) Seek(offset int64, whence int) (int64, error)

Jump to

Keyboard shortcuts

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