ftp

package
v0.0.0-...-f81bbf2 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2023 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidAuthentication = errors.New("wrong Username or Password")
)

Error declarations.

Functions

This section is empty.

Types

type FTPStorage

type FTPStorage struct {
	knoxite.StorageFilesystem
	// contains filtered or unexported fields
}

FTPStorage stores data on a remote FTP.

func (*FTPStorage) AvailableSpace

func (backend *FTPStorage) AvailableSpace() (uint64, error)

AvailableSpace returns the free space on this backen.

func (*FTPStorage) Close

func (backend *FTPStorage) Close() error

Close the backend.

func (*FTPStorage) CreatePath

func (backend *FTPStorage) CreatePath(path string) error

CreatePath creates a dir including all its parent dirs, when required.

func (*FTPStorage) DeleteFile

func (backend *FTPStorage) DeleteFile(path string) error

DeleteFile deletes a file from ftp.

func (*FTPStorage) DeletePath

func (backend *FTPStorage) DeletePath(path string) error

DeletePath deletes a directory including all its content from ftp.

func (*FTPStorage) Description

func (backend *FTPStorage) Description() string

Description returns a user-friendly description for this backend.

func (*FTPStorage) Location

func (backend *FTPStorage) Location() string

Location returns the type and location of the repository.

func (*FTPStorage) NewBackend

func (*FTPStorage) NewBackend(u url.URL) (knoxite.Backend, error)

NewBackend establishes an FTP connection and returns a FTPStorage backend.

func (*FTPStorage) Protocols

func (backend *FTPStorage) Protocols() []string

Protocols returns the Protocol Schemes supported by this backend.

func (*FTPStorage) ReadFile

func (backend *FTPStorage) ReadFile(path string) ([]byte, error)

ReadFile reads a file from ftp.

func (*FTPStorage) Stat

func (backend *FTPStorage) Stat(path string) (uint64, error)

Stat returns the size of a file on ftp.

func (*FTPStorage) WriteFile

func (backend *FTPStorage) WriteFile(path string, data []byte) (size uint64, err error)

WriteFile writes file to ftp.

Jump to

Keyboard shortcuts

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