sftpc

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

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

Go to latest
Published: May 16, 2024 License: LGPL-2.1 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