sftpclient

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2026 License: MIT Imports: 14 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 {
	// contains filtered or unexported fields
}

func Open

func Open(ctx context.Context, options OpenOptions) (*Client, error)

func (*Client) Close

func (c *Client) Close() error

func (*Client) Getwd

func (c *Client) Getwd() (string, error)

func (*Client) InitialDirectory

func (c *Client) InitialDirectory(cwd string) (string, error)

func (*Client) Lstat

func (c *Client) Lstat(name string) (os.FileInfo, error)

func (*Client) Mkdir

func (c *Client) Mkdir(name string) error

func (*Client) Open

func (c *Client) Open(path string) (io.ReadCloser, error)

func (*Client) OpenFile

func (c *Client) OpenFile(path string, flags int) (io.WriteCloser, error)

func (*Client) PosixRename

func (c *Client) PosixRename(oldPath, newPath string) error

func (*Client) ReadDir

func (c *Client) ReadDir(name string) ([]os.FileInfo, error)

func (*Client) RealPath

func (c *Client) RealPath(name string) (string, error)

func (*Client) Remove

func (c *Client) Remove(name string) error

func (*Client) RemoveDirectory

func (c *Client) RemoveDirectory(name string) error

func (*Client) Rename

func (c *Client) Rename(oldPath, newPath string) error

func (*Client) Wait

func (c *Client) Wait() error

type OpenOptions

type OpenOptions struct {
	Connection         jumpserver.ClientConnection
	HostKeyCallback    ssh.HostKeyCallback
	Timeout            time.Duration
	RootPath           *string
	AccountUsername    string
	HomeDirectory      string
	JumpServerUsername string
}

Jump to

Keyboard shortcuts

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