sftpfs

package
v0.0.29 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2026 License: BSD-3-Clause Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrTypeAssertion = errors.New("type assertion failed")
View Source
var InodePrefix = "inode/"
View Source
var LookupPrefix = "lookup"
View Source
var MaxPacket = 32 * 1024 * 1024 // 32 MB

Functions

func NormalizeError added in v0.0.3

func NormalizeError(err error) error

Types

type SFTP

type SFTP struct {
	Client *sftp.Client
}

func New

func New(conn *ssh.Client) (*SFTP, error)

func NewPipe

func NewPipe(r io.Reader, w io.WriteCloser) (*SFTP, error)

func (*SFTP) Checksum added in v0.0.25

func (s *SFTP) Checksum(path string, algorithm crypto.Hash) ([]byte, error)

func (*SFTP) Chmod added in v0.0.3

func (s *SFTP) Chmod(path string, mode os.FileMode) error

func (*SFTP) Chown added in v0.0.3

func (s *SFTP) Chown(path string, uid, gid int) error

func (*SFTP) Chtimes added in v0.0.3

func (s *SFTP) Chtimes(path string, atime, mtime time.Time) error

func (*SFTP) Close added in v0.0.3

func (s *SFTP) Close() error

func (*SFTP) FileRead

func (s *SFTP) FileRead(path string) (vfs.ReaderAt, error)

func (*SFTP) FileWrite

func (s *SFTP) FileWrite(path string, flags int) (vfs.WriterAt, error)

func (*SFTP) Handle

func (s *SFTP) Handle(path string) ([]byte, error)
func (s *SFTP) Link(target, path string) error

func (*SFTP) List

func (s *SFTP) List(path string) (vfs.ListerAt, error)

func (*SFTP) Lstat

func (s *SFTP) Lstat(path string) (vfs.FileInfo, error)

func (*SFTP) Mkdir

func (s *SFTP) Mkdir(path string, perm os.FileMode) error
func (s *SFTP) NumLinks(path string) (uint64, error)

func (*SFTP) Open

func (s *SFTP) Open(path string) (vfs.File, error)

func (*SFTP) OpenFile

func (s *SFTP) OpenFile(path string, flag int, perm os.FileMode) (vfs.File, error)

func (*SFTP) Path

func (s *SFTP) Path(handle []byte) (string, error)
func (s *SFTP) Readlink(path string) (string, error)

func (*SFTP) RealPath added in v0.0.3

func (s *SFTP) RealPath(path string) (string, error)

func (*SFTP) Remove added in v0.0.3

func (s *SFTP) Remove(path string) error

func (*SFTP) Rename added in v0.0.3

func (s *SFTP) Rename(oldpath, newpath string) error

func (*SFTP) Rmdir

func (s *SFTP) Rmdir(path string) error

func (*SFTP) SetExtendedAttr

func (s *SFTP) SetExtendedAttr(path, name string, value []byte) error

func (*SFTP) SetExtendedAttrs

func (s *SFTP) SetExtendedAttrs(path string, attrs vfs.Attributes) error

func (*SFTP) Stat

func (s *SFTP) Stat(path string) (vfs.FileInfo, error)
func (s *SFTP) Symlink(target, path string) error

func (*SFTP) Truncate added in v0.0.3

func (s *SFTP) Truncate(path string, size int64) error

func (*SFTP) UnsetExtendedAttr

func (s *SFTP) UnsetExtendedAttr(path, name string) error

type SFTPDirectory

type SFTPDirectory struct {
	// contains filtered or unexported fields
}

func (*SFTPDirectory) Close

func (d *SFTPDirectory) Close() error

func (*SFTPDirectory) Name

func (d *SFTPDirectory) Name() string

func (*SFTPDirectory) Read

func (d *SFTPDirectory) Read([]byte) (int, error)

func (*SFTPDirectory) ReadAt

func (d *SFTPDirectory) ReadAt([]byte, int64) (int, error)

func (*SFTPDirectory) Readdir

func (d *SFTPDirectory) Readdir(n int) ([]vfs.FileInfo, error)

func (*SFTPDirectory) Seek

func (d *SFTPDirectory) Seek(int64, int) (int64, error)

func (*SFTPDirectory) Stat

func (d *SFTPDirectory) Stat() (vfs.FileInfo, error)

func (*SFTPDirectory) Truncate

func (d *SFTPDirectory) Truncate(int64) error

func (*SFTPDirectory) Write

func (d *SFTPDirectory) Write([]byte) (int, error)

func (*SFTPDirectory) WriteAt

func (d *SFTPDirectory) WriteAt([]byte, int64) (int, error)

type SFTPFile

type SFTPFile struct {
	*sftp.File
	// contains filtered or unexported fields
}

func (*SFTPFile) Readdir

func (f *SFTPFile) Readdir(int) ([]vfs.FileInfo, error)

func (*SFTPFile) Stat

func (f *SFTPFile) Stat() (vfs.FileInfo, error)

type SFTPFileInfo

type SFTPFileInfo struct {
	os.FileInfo
	// contains filtered or unexported fields
}

func (*SFTPFileInfo) Extended

func (s *SFTPFileInfo) Extended() (vfs.Attributes, error)

func (*SFTPFileInfo) Gid

func (s *SFTPFileInfo) Gid() uint32
func (s *SFTPFileInfo) NumLinks() uint64

func (*SFTPFileInfo) Permissions

func (s *SFTPFileInfo) Permissions() (*vfs.Permissions, error)

func (*SFTPFileInfo) Sys

func (s *SFTPFileInfo) Sys() any

func (*SFTPFileInfo) Uid

func (s *SFTPFileInfo) Uid() uint32

Jump to

Keyboard shortcuts

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