fe

package
v0.0.0-...-ae2d994 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2015 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

View Source
const DefaultTimeout = 30 * time.Second

Variables

This section is empty.

Functions

This section is empty.

Types

type FileExplorer

type FileExplorer interface {
	Init() error
	ListDir(path string) ([]models.ListDirEntry, error)
	Move(path string, newPath string) error
	Copy(path string, newPath string) error
	Delete(path string) error
	Chmod(path string, code string) error
	Mkdir(path string, name string) error
	Close() error
}

type SSHFileExplorer

type SSHFileExplorer struct {
	FileExplorer
	Host     string
	User     string
	Password string
	// contains filtered or unexported fields
}

func NewSSHFileExplorer

func NewSSHFileExplorer(host string, user string, password string) *SSHFileExplorer

func (*SSHFileExplorer) Chmod

func (fe *SSHFileExplorer) Chmod(path string, code string) error

func (*SSHFileExplorer) Close

func (fe *SSHFileExplorer) Close() error

func (*SSHFileExplorer) Copy

func (fe *SSHFileExplorer) Copy(path string, newPath string) error

func (*SSHFileExplorer) Delete

func (fe *SSHFileExplorer) Delete(path string) error

func (*SSHFileExplorer) Exec

func (fe *SSHFileExplorer) Exec(cmd string) ([]byte, error)

Execute cmd on the remote host and return stderr and stdout

func (*SSHFileExplorer) ExecOnly

func (fe *SSHFileExplorer) ExecOnly(cmd string) error

func (*SSHFileExplorer) Init

func (fe *SSHFileExplorer) Init() error

func (*SSHFileExplorer) ListDir

func (fe *SSHFileExplorer) ListDir(path string) ([]models.ListDirEntry, error)

func (*SSHFileExplorer) Mkdir

func (fe *SSHFileExplorer) Mkdir(path string, name string) error

func (*SSHFileExplorer) Move

func (fe *SSHFileExplorer) Move(path string, newPath string) error

Jump to

Keyboard shortcuts

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