Documentation
¶
Overview ¶
Package ftpfs adapts github.com/jlaffaye/ftp to ShellCN's shared file browser.
Index ¶
- Constants
- func Connect(ctx context.Context, cfg plugin.ConnectConfig, opts Options) (plugin.Session, error)
- type Client
- func (c *Client) Copy(_ context.Context, src, dst string) error
- func (c *Client) Home(context.Context) (string, error)
- func (c *Client) MapError(err error) error
- func (c *Client) Mkdir(_ context.Context, p string) error
- func (c *Client) Move(_ context.Context, src, dst string) error
- func (c *Client) Open(_ context.Context, p string) (io.ReadCloser, error)
- func (c *Client) OpenRange(_ context.Context, p string, offset, _ int64) (io.ReadCloser, error)
- func (c *Client) ReadDir(_ context.Context, p string) ([]os.FileInfo, error)
- func (c *Client) Remove(_ context.Context, p string, isDir bool) error
- func (c *Client) Rename(_ context.Context, from, to string) error
- func (c *Client) Stat(_ context.Context, p string) (os.FileInfo, error)
- func (c *Client) Write(_ context.Context, p string, r io.Reader) error
- type Options
- type Session
- type TLSMode
Constants ¶
View Source
const ( DefaultFTPPort = 21 DefaultFTPSPort = 990 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) Copy ¶
Copy duplicates src to dst. A single FTP control connection allows only one active data transfer, so the source is fully drained (and its data connection closed) before the upload begins.
func (*Client) OpenRange ¶
OpenRange reads from offset via REST/RETR; the single connection is held until Close, so ranged reads serialize.
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
func NewSession ¶
func (*Session) Filesystem ¶
func (s *Session) Filesystem() (filesystem.Client, error)
func (*Session) OpenChannel ¶
Click to show internal directories.
Click to hide internal directories.