sftputil

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2024 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SftpAgent

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

func NewSftpAgent

func NewSftpAgent(user, passwd, server string, port int) *SftpAgent

func (*SftpAgent) Connect

func (agent *SftpAgent) Connect() (client *sftp.Client, err error)

func (*SftpAgent) DownloadFile

func (agent *SftpAgent) DownloadFile(remotePath, loclaPath string) (err error)

func (*SftpAgent) IsExists added in v0.2.6

func (agent *SftpAgent) IsExists(remotePath string) (exists bool, err error)

func (*SftpAgent) ReadDirectoryInfo

func (agent *SftpAgent) ReadDirectoryInfo(remoteDir string) (fileInfoArray []fs.FileInfo, err error)

func (*SftpAgent) ReadFileContent added in v0.2.7

func (agent *SftpAgent) ReadFileContent(remotePath string) (target []byte, err error)

func (*SftpAgent) ReadFileInfo

func (agent *SftpAgent) ReadFileInfo(remotePath string) (fileInfo fs.FileInfo, err error)

func (*SftpAgent) RemoveAll

func (agent *SftpAgent) RemoveAll(remotePath string) (err error)

func (*SftpAgent) RemoveFile

func (agent *SftpAgent) RemoveFile(remotePath string) (err error)

func (*SftpAgent) UploadContent added in v0.2.7

func (agent *SftpAgent) UploadContent(content []byte, remotePath string) (err error)

func (*SftpAgent) UploadDirectory

func (agent *SftpAgent) UploadDirectory(localPath, remotePath string) (err error)

func (*SftpAgent) UploadFile

func (agent *SftpAgent) UploadFile(localPath, remotePath string) (err error)

Jump to

Keyboard shortcuts

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