Documentation ¶
Index ¶
- Constants
- func CleanPath(fs afero.Fs, path string) string
- func NewOsFs() afero.Fs
- func NewSftpFs(host string, port int, username, password string) (afero.Fs, error)
- func NormalizeDir(name string, client *sftp.Client) (string, error)
- func Walk(fs afero.Fs, root string, walkFn filepath.WalkFunc) error
- type File
- func (f *File) Close() error
- func (f *File) Name() string
- func (f *File) Read(b []byte) (n int, err error)
- func (f *File) ReadAt(b []byte, off int64) (n int, err error)
- func (f *File) Readdir(count int) (res []os.FileInfo, err error)
- func (f *File) Readdirnames(n int) (names []string, err error)
- func (f *File) Seek(offset int64, whence int) (int64, error)
- func (f *File) Stat() (os.FileInfo, error)
- func (f *File) Sync() error
- func (f *File) Truncate(size int64) error
- func (f *File) Write(b []byte) (n int, err error)
- func (f *File) WriteAt(b []byte, off int64) (n int, err error)
- func (f *File) WriteString(s string) (ret int, err error)
- type OsFs
- func (OsFs) Chmod(name string, mode os.FileMode) error
- func (OsFs) Chtimes(name string, atime time.Time, mtime time.Time) error
- func (OsFs) Close()
- func (OsFs) Create(name string) (afero.File, error)
- func (OsFs) Mkdir(name string, perm os.FileMode) error
- func (OsFs) MkdirAll(path string, perm os.FileMode) error
- func (OsFs) Name() string
- func (OsFs) Open(name string) (afero.File, error)
- func (OsFs) OpenFile(name string, flag int, perm os.FileMode) (afero.File, error)
- func (OsFs) Remove(name string) error
- func (OsFs) RemoveAll(path string) error
- func (OsFs) Rename(oldname, newname string) error
- func (OsFs) Stat(name string) (os.FileInfo, error)
- type SftpFs
- func (s SftpFs) Chmod(name string, mode os.FileMode) error
- func (s SftpFs) Chtimes(name string, atime time.Time, mtime time.Time) error
- func (s SftpFs) Close()
- func (s SftpFs) Create(name string) (afero.File, error)
- func (s SftpFs) Lstat(p string) (os.FileInfo, error)
- func (s SftpFs) Mkdir(name string, perm os.FileMode) error
- func (s SftpFs) MkdirAll(path string, perm os.FileMode) error
- func (s SftpFs) Name() string
- func (s SftpFs) Open(name string) (afero.File, error)
- func (s SftpFs) OpenFile(name string, flag int, perm os.FileMode) (afero.File, error)
- func (s SftpFs) Remove(name string) error
- func (s SftpFs) RemoveAll(path string) error
- func (s SftpFs) Rename(oldname, newname string) error
- func (s SftpFs) Stat(name string) (os.FileInfo, error)
- type SftpFsContext
Constants ¶
View Source
const (
NameOsfs = "OsFs"
)
View Source
const (
NameSftpfs = "sftpfs"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type SftpFs ¶
type SftpFs struct { // *io.Closer afero.Fs Context *SftpFsContext // contains filtered or unexported fields }
Fs is a afero.Fs implementation that uses functions provided by the sftp package.
For details in any method, check the documentation of the sftp package (github.com/pkg/sftp).
type SftpFsContext ¶
func NewSftpFsContext ¶
func NewSftpFsContext(user, password, host string) (*SftpFsContext, error)
func (*SftpFsContext) Close ¶
func (ctx *SftpFsContext) Close() error
Click to show internal directories.
Click to hide internal directories.