Versions in this module Expand all Collapse all v0 v0.55.0 May 4, 2024 v0.54.0 Apr 4, 2024 Changes in this version + const OpenFlagAppend + const OpenFlagCreate + const OpenFlagExcl + const OpenFlagRead + const OpenFlagTruncate + const OpenFlagWrite + var ErrBadMessage = errors.New("sftp: bad message") + var ErrConnectionLost = errors.New("sftp: connection lost") + var ErrFailure = errors.New("sftp: failure") + var ErrNoConnection = errors.New("sftp: no connection") + var ErrOpUnsupported = errors.New("sftp: operation unsupported") + var ErrSubsystem = errors.New("sftp: unsupported subsystem") + var ErrVersion = errors.New("sftp: unsupported version") + type Client struct + func NewClient(sshc *ssh.Client) (cl *Client, err error) + func (cl *Client) Close() (err error) + func (cl *Client) CloseFile(fh *FileHandle) (err error) + func (cl *Client) Create(remoteFile string, fa *FileAttrs) (*FileHandle, error) + func (cl *Client) Fsetstat(fh *FileHandle, fa *FileAttrs) (err error) + func (cl *Client) Fstat(fh *FileHandle) (fa *FileAttrs, err error) + func (cl *Client) Get(remoteFile, localFile string) (err error) + func (cl *Client) Lstat(remoteFile string) (fa *FileAttrs, err error) + func (cl *Client) Mkdir(path string, fa *FileAttrs) (err error) + func (cl *Client) MkdirAll(dir string, fa *FileAttrs) (err error) + func (cl *Client) Open(remoteFile string) (fh *FileHandle, err error) + func (cl *Client) OpenFile(remoteFile string, flags uint32, fa *FileAttrs) (fh *FileHandle, err error) + func (cl *Client) Opendir(path string) (fh *FileHandle, err error) + func (cl *Client) Put(localFile, remoteFile string) (err error) + func (cl *Client) Read(fh *FileHandle, offset uint64) (data []byte, err error) + func (cl *Client) Readdir(fh *FileHandle) (nodes []fs.DirEntry, err error) + func (cl *Client) Readlink(linkPath string) (node fs.DirEntry, err error) + func (cl *Client) Realpath(path string) (node fs.DirEntry, err error) + func (cl *Client) Remove(remoteFile string) (err error) + func (cl *Client) Rename(oldPath, newPath string) (err error) + func (cl *Client) Rmdir(path string) (err error) + func (cl *Client) Setstat(remoteFile string, fa *FileAttrs) (err error) + func (cl *Client) Stat(remoteFile string) (fa *FileAttrs, err error) + func (cl *Client) Symlink(targetPath, linkPath string) (err error) + func (cl *Client) Write(fh *FileHandle, offset uint64, data []byte) (err error) + type FileAttrs struct + func NewFileAttrs(fi fs.FileInfo) (fa *FileAttrs) + func (fa *FileAttrs) AccessTime() uint32 + func (fa *FileAttrs) Extensions() map[string]string + func (fa *FileAttrs) Gid() uint32 + func (fa *FileAttrs) IsDir() bool + func (fa *FileAttrs) ModTime() time.Time + func (fa *FileAttrs) Mode() fs.FileMode + func (fa *FileAttrs) Name() string + func (fa *FileAttrs) Permissions() uint32 + func (fa *FileAttrs) SetAccessTime(v uint32) + func (fa *FileAttrs) SetExtension(name, data string) + func (fa *FileAttrs) SetGid(gid uint32) + func (fa *FileAttrs) SetModifiedTime(v uint32) + func (fa *FileAttrs) SetPermissions(v uint32) + func (fa *FileAttrs) SetSize(v uint64) + func (fa *FileAttrs) SetUID(uid uint32) + func (fa *FileAttrs) Size() int64 + func (fa *FileAttrs) Sys() interface{} + func (fa *FileAttrs) UID() uint32 + type FileHandle struct