Documentation ¶
Index ¶
- Constants
- type FileExplorer
- type SSHFileExplorer
- func (fe *SSHFileExplorer) Chmod(path []string, code string, recursive bool) (err error)
- func (fe *SSHFileExplorer) Close() error
- func (fe *SSHFileExplorer) Copy(path []string, newPath string, singleFilename string) (err error)
- func (fe *SSHFileExplorer) Delete(path []string) (err error)
- func (fe *SSHFileExplorer) Exec(cmd string) ([]byte, error)
- func (fe *SSHFileExplorer) ExecOnly(cmd string) error
- func (fe *SSHFileExplorer) Init() error
- func (fe *SSHFileExplorer) ListDir(path string) ([]models.ListDirEntry, error)
- func (fe *SSHFileExplorer) Mkdir(path string) error
- func (fe *SSHFileExplorer) Move(path []string, newPath string) (err error)
- func (fe *SSHFileExplorer) Rename(path string, newPath string) error
- func (fe *SSHFileExplorer) UploadFile(destination string, part *multipart.Part) (err error)
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) Rename(path string, newPath string) error Move(path []string, newPath string) (err error) Copy(path []string, newPath string, singleFilename string) (err error) Delete(path []string) (err error) Chmod(path []string, code string, recursive bool) (err error) Mkdir(path string) error UploadFile(destination string, part *multipart.Part) (err 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, recursive bool) (err error)
func (*SSHFileExplorer) Close ¶
func (fe *SSHFileExplorer) Close() error
func (*SSHFileExplorer) Copy ¶
func (fe *SSHFileExplorer) Copy(path []string, newPath string, singleFilename string) (err error)
func (*SSHFileExplorer) Delete ¶
func (fe *SSHFileExplorer) Delete(path []string) (err 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) error
func (*SSHFileExplorer) Move ¶
func (fe *SSHFileExplorer) Move(path []string, newPath string) (err error)
func (*SSHFileExplorer) Rename ¶
func (fe *SSHFileExplorer) Rename(path string, newPath string) error
func (*SSHFileExplorer) UploadFile ¶
func (fe *SSHFileExplorer) UploadFile(destination string, part *multipart.Part) (err error)
Click to show internal directories.
Click to hide internal directories.