Documentation ¶
Index ¶
- type Client
- func (c *Client) Append(path string, data *bytes.Reader) error
- func (c *Client) Close()
- func (c *Client) Connection() (*sftp.Client, error)
- func (c *Client) Create(filePath string) (io.ReadWriteCloser, error)
- func (c *Client) Download(filePath string) (io.ReadCloser, error)
- func (c *Client) Info(filePath string) (os.FileInfo, error)
- func (c *Client) List(path string) ([]os.FileInfo, error)
- func (c *Client) Mkdir(path string) error
- func (c *Client) MkdirAll(path string) error
- func (c *Client) Remove(path string) error
- func (c *Client) RemoveDir(path string) error
- func (c *Client) Stat(path string) (os.FileInfo, error)
- func (c *Client) Touch(path string) error
- func (c *Client) Upload(source io.Reader, destination io.Writer, size int) error
- func (c *Client) Write(path string, data *bytes.Reader) error
- type Config
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
}
Client provides basic functionality to interact with a SFTP server.
func (*Client) Create ¶
func (c *Client) Create(filePath string) (io.ReadWriteCloser, error)
Create creates a remote/destination file for I/O.
func (*Client) Download ¶
func (c *Client) Download(filePath string) (io.ReadCloser, error)
Download returns remote/destination file for reading.
func (*Client) Info ¶
Info gets the details of a file. If the file was not found, an error is returned.
Click to show internal directories.
Click to hide internal directories.