sshfs

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SSHFS

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

SSHFS ...

func Connect

func Connect(root string, config *sshconfig.SSHHost) (*SSHFS, error)

Connect returns a functioning instance of *SSHFS using the given ssh.ClientConfig configuration to create and connect an SSH transport layer. the Disconnect method of the SSHFS instance will disconnect the SSH connection too.

func ConnectClient

func ConnectClient(root string, sshClient *ssh.Client) (*SSHFS, error)

ConnectClient returns a functioning instance of *SSHFS using the given ssh.Client as transport layer.

func ConnectFromConfig

func ConnectFromConfig(root string, sshHostName string) (*SSHFS, error)

ConnectFromConfig returns a functioning instance of *SSHFS using the info in ~/.ssh/config to create and connect an SSH transport layer. the Disconnect method of the SSHFS instance will disconnect the SSH connection too.

func (*SSHFS) Disconnect

func (fsys *SSHFS) Disconnect()

Disconnect ...

func (*SSHFS) Open

func (fsys *SSHFS) Open(name string) (fs.File, error)

Open implements fs.FS

func (*SSHFS) OpenFile

func (fsys *SSHFS) OpenFile(name string, flag int, perm fs.FileMode) (writefs.FileWriter, error)

OpenFile implements writefs.WriteFS

func (*SSHFS) ReadDir

func (fsys *SSHFS) ReadDir(name string) ([]fs.DirEntry, error)

ReadDir implements fs.ReadDirFS

func (*SSHFS) ReadFile

func (fsys *SSHFS) ReadFile(name string) ([]byte, error)

ReadFile implements fs.ReadFileFS

func (*SSHFS) Stat

func (fsys *SSHFS) Stat(name string) (fs.FileInfo, error)

Stat implements fs.StatFS

Jump to

Keyboard shortcuts

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