sftpc

package
v8.0.0-...-0f2c8d7 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	User     string
	Password string
	Host     string
	Port     int
}

func (*Client) Close

func (s *Client) Close(session *SftpSession) error

func (*Client) Download

func (s *Client) Download(session *SftpSession, remotePath, localFilePath string) error

Download 下载远程文件到本地

func (*Client) NewSession

func (s *Client) NewSession() (*SftpSession, error)

NewSession 创建一个新的sftp会话

func (*Client) Remove

func (s *Client) Remove(session *SftpSession, remotePath string) error

func (*Client) Upload

func (s *Client) Upload(session *SftpSession, localFilePath, remotePath string) error

Upload 上传本地文件到远程

type SftpSession

type SftpSession struct {
	Client *sftp.Client
}

SftpSession sftp会话

Jump to

Keyboard shortcuts

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