Documentation ¶
Overview ¶
Package sftp contains a go 1.16 conformance filesystem implementation for SSH file Transfer Protocol.
Index ¶
- type FS
- func (f *FS) Mkdir(name string) error
- func (f *FS) MkdirAll(name string) error
- func (f *FS) Open(name string) (fs.File, error)
- func (f *FS) OpenFile(name string, flag int, perm os.FileMode) (fs.File, error)
- func (f *FS) ReadDir(name string) ([]fs.DirEntry, error)
- func (f *FS) RemoveAll(name string) error
- func (f *FS) Sub(dir string) (fs.FS, error)
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FS ¶
type FS struct {
// contains filtered or unexported fields
}
func (*FS) Mkdir ¶
Mkdir creates the specified directory. An error will be returned if a file or directory with the specified path already exists, or if the directory's parent folder does not exist (the method cannot create complete paths).
func (*FS) MkdirAll ¶
MkdirAll creates a directory named path, along with any necessary parents, and returns nil, or else returns an error. If path is already a directory, MkdirAll does nothing and returns nil. If path contains a regular file, an error is returned
type Options ¶
type Options struct { Host string Port int // Port default is 22. User string Password string Callback ssh.HostKeyCallback // Callback default is ssh.InsecureIgnoreHostKey which must be considered insecure. }
Options to connect to an FTP over SSH service, respective the SSH file Transfer Protocol.