sftpfs

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2026 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Overview

Package sftpfs implements wfs.FS using github.com/pkg/sftp.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FS

type FS struct {
	User, Host string
	// contains filtered or unexported fields
}

An FS holds an SFTP connection and wraps its operations into the wfs.FS interface.

func Dial

func Dial(target string) (*FS, error)

Dial establishes a new SFTP connection to the given host.

func (*FS) Chmod

func (f *FS) Chmod(name string, mode fs.FileMode) error

func (*FS) Close

func (f *FS) Close() error

Close closes the underlying SFTP connection.

func (*FS) Create

func (f *FS) Create(name string, perm fs.FileMode) (io.WriteCloser, error)

func (*FS) Lstat

func (f *FS) Lstat(name string) (fs.FileInfo, error)

func (*FS) Mkdir

func (f *FS) Mkdir(name string) error

func (*FS) Open

func (f *FS) Open(name string) (fs.File, error)

func (*FS) ReadDir

func (f *FS) ReadDir(name string) ([]fs.DirEntry, error)
func (f *FS) ReadLink(name string) (string, error)

func (*FS) Remove

func (f *FS) Remove(name string) error

func (*FS) Stat

func (f *FS) Stat(name string) (fs.FileInfo, error)
func (f *FS) Symlink(oldname, newname string) error

Source Files

  • sftpfs.go

Jump to

Keyboard shortcuts

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