sftpfilesystem

package
v0.0.0-...-5bbce0e Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SFTP

type SFTP struct {
	Host string
	User string
	Pass string
	Port string
}

SFTP is the overall type for the sftp filesystem, and contains the connection credentials (host, user, password) and the port to connect on.

func (*SFTP) Delete

func (s *SFTP) Delete(itemsToDelete []string) bool

Delete removes one or more files from the remote filesystem, returning false as soon as any removal fails

func (*SFTP) Get

func (s *SFTP) Get(destination string, items ...string) error

Get pulls one or more files from the remote file system and saves them under destination on our server, using the base name of each item

func (*SFTP) List

func (s *SFTP) List(prefix string) ([]filesystems.Listing, error)

List returns a listing of all files in the remote directory named by prefix, except for files with a leading . in the name

func (*SFTP) Put

func (s *SFTP) Put(fileName, folder string) error

Put transfers a file to the remote file system, storing it under folder using the base name of fileName

Jump to

Keyboard shortcuts

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