Versions in this module Expand all Collapse all v1 v1.0.0 Feb 8, 2021 Changes in this version + var ErrBadPattern = errors.New("syntax error in pattern") + func Join(elem ...string) string + func Match(pattern, name string) (matched bool, err error) + func MaxPacket(size int) func(*Client) error + func Split(path string) (dir, file string) + type Client struct + func NewClient(conn *ssh.Client, opts ...func(*Client) error) (*Client, error) + func NewClientPipe(rd io.Reader, wr io.WriteCloser, opts ...func(*Client) error) (*Client, error) + func (c *Client) Chmod(path string, mode os.FileMode) error + func (c *Client) Chown(path string, uid, gid int) error + func (c *Client) Chtimes(path string, atime time.Time, mtime time.Time) error + func (c *Client) Close() error + func (c *Client) Create(path string) (*File, error) + func (c *Client) Getwd() (string, error) + func (c *Client) Glob(pattern string) (matches []string, err error) + func (c *Client) Join(elem ...string) string + func (c *Client) Lstat(p string) (os.FileInfo, error) + func (c *Client) Mkdir(path string) error + func (c *Client) Open(path string) (*File, error) + func (c *Client) OpenFile(path string, f int) (*File, error) + func (c *Client) ReadDir(p string) ([]os.FileInfo, error) + func (c *Client) ReadLink(p string) (string, error) + func (c *Client) Realpath(path string) (string, error) + func (c *Client) Remove(path string) error + func (c *Client) RemoveDirectory(path string) error + func (c *Client) Rename(oldname, newname string) error + func (c *Client) Stat(p string) (os.FileInfo, error) + func (c *Client) StatVFS(path string) (*StatVFS, error) + func (c *Client) Symlink(oldname, newname string) error + func (c *Client) Truncate(path string, size int64) error + func (c *Client) Walk(root string) *fs.Walker + type File struct + func (f *File) Chmod(mode os.FileMode) error + func (f *File) Chown(uid, gid int) error + func (f *File) Close() error + func (f *File) Name() string + func (f *File) Read(b []byte) (int, error) + func (f *File) ReadFrom(r io.Reader) (int64, error) + func (f *File) Seek(offset int64, whence int) (int64, error) + func (f *File) Stat() (os.FileInfo, error) + func (f *File) Truncate(size int64) error + func (f *File) Write(b []byte) (int, error) + func (f *File) WriteTo(w io.Writer) (int64, error) + type FileCmder interface + Filecmd func(Request) error + type FileInfoer interface + Fileinfo func(Request) ([]os.FileInfo, error) + type FileReader interface + Fileread func(Request) (io.ReaderAt, error) + type FileStat struct + Atime uint32 + Extended []StatExtended + GID uint32 + Mode uint32 + Mtime uint32 + Size uint64 + UID uint32 + type FileWriter interface + Filewrite func(Request) (io.WriterAt, error) + type Handlers struct + FileCmd FileCmder + FileGet FileReader + FileInfo FileInfoer + FilePut FileWriter + func InMemHandler() Handlers + type Request struct + Attrs []byte + Filepath string + Flags uint32 + Method string + Target string + func NewRequest(method, path string) Request + type RequestServer struct + Handlers Handlers + func NewRequestServer(rwc io.ReadWriteCloser, h Handlers) *RequestServer + func (rs *RequestServer) Close() error + func (rs *RequestServer) Serve() error + type Server struct + func NewServer(rwc io.ReadWriteCloser, options ...ServerOption) (*Server, error) + func (svr *Server) Serve() error + type ServerOption func(*Server) error + func ReadOnly() ServerOption + func WithDebug(w io.Writer) ServerOption + type StatExtended struct + ExtData string + ExtType string + type StatVFS struct + Bavail uint64 + Bfree uint64 + Blocks uint64 + Bsize uint64 + Favail uint64 + Ffree uint64 + Files uint64 + Flag uint64 + Frsize uint64 + Fsid uint64 + ID uint32 + Namemax uint64 + func (p *StatVFS) FreeSpace() uint64 + func (p *StatVFS) MarshalBinary() ([]byte, error) + func (p *StatVFS) TotalSpace() uint64 + type StatusError struct + Code uint32 + func (s *StatusError) Error() string