sftp

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repo added in v0.0.9

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

func Dial

func Dial(url *url.URL) (*Repo, error)

Dial an SFTP connection and return a new repository.

func New added in v0.0.9

func New(sftp *sftp.Client, dir string) *Repo

New creates a new SFTP repository.

func (*Repo) Close added in v0.0.9

func (c *Repo) Close() (err error)

func (*Repo) Download added in v0.0.9

func (c *Repo) Download(ctx context.Context, path string) (*repos.File, error)

TODO: this implementation conceptually differs from the local repo implementation

func (*Repo) Lstat added in v0.2.2

func (r *Repo) Lstat(name string) (fs.FileInfo, error)

func (*Repo) MkdirAll added in v0.0.9

func (r *Repo) MkdirAll(name string, perm fs.FileMode) error

func (*Repo) Open added in v0.0.9

func (r *Repo) Open(name string) (fs.File, error)

func (*Repo) OpenFile added in v0.2.0

func (r *Repo) OpenFile(name string, flag int, perm fs.FileMode) (virt.RWFile, error)

func (*Repo) ReadDir added in v0.0.9

func (r *Repo) ReadDir(name string) ([]fs.DirEntry, error)
func (r *Repo) Readlink(name string) (string, error)

func (*Repo) RemoveAll added in v0.0.9

func (r *Repo) RemoveAll(name string) error

RemoveAll removes a path and anything it contains. Like os.RemoveAll, a missing path is not an error.

func (*Repo) Stat added in v0.0.9

func (r *Repo) Stat(name string) (fs.FileInfo, error)

func (*Repo) Upload added in v0.0.9

func (c *Repo) Upload(ctx context.Context, from *repos.File) error

func (*Repo) WriteFile added in v0.0.9

func (r *Repo) WriteFile(name string, data []byte, mode fs.FileMode) error

Jump to

Keyboard shortcuts

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