ftp

package
v3.35.3-8Mi Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2024 License: AGPL-3.0 Imports: 13 Imported by: 0

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"`
	Encoding string `json:"encoding" 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 FileReader

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

FileReader An FTP file reader that implements io.MFile for seeking.

func NewFileReader

func NewFileReader(conn *ftp.ServerConn, path string, size int64) *FileReader

func (*FileReader) Close

func (r *FileReader) Close() error

func (*FileReader) Read

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

func (*FileReader) ReadAt

func (r *FileReader) ReadAt(buf []byte, off int64) (n int, err error)

func (*FileReader) Seek

func (r *FileReader) 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