sftpfs

package
v0.0.0-...-09e2ff1 Latest Latest
Warning

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

Go to latest
Published: May 10, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(client *sftp.Client) afero.Fs

Types

type File

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

func FileCreate

func FileCreate(s *sftp.Client, name string) (*File, error)

func FileOpen

func FileOpen(s *sftp.Client, name string) (*File, error)

func (*File) Close

func (f *File) Close() error

func (*File) Name

func (f *File) Name() string

func (*File) Read

func (f *File) Read(b []byte) (n int, err error)

func (*File) ReadAt

func (f *File) ReadAt(b []byte, off int64) (n int, err error)

func (*File) Readdir

func (f *File) Readdir(count int) (res []os.FileInfo, err error)

func (*File) Readdirnames

func (f *File) Readdirnames(n int) (names []string, err error)

func (*File) Seek

func (f *File) Seek(offset int64, whence int) (int64, error)

func (*File) Stat

func (f *File) Stat() (os.FileInfo, error)

func (*File) Sync

func (f *File) Sync() error

func (*File) Truncate

func (f *File) Truncate(size int64) error

func (*File) Write

func (f *File) Write(b []byte) (n int, err error)

func (*File) WriteAt

func (f *File) WriteAt(b []byte, off int64) (n int, err error)

TODO

func (*File) WriteString

func (f *File) WriteString(s string) (ret int, err error)

type Fs

type Fs struct {
	// 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).

func (Fs) Chmod

func (s Fs) Chmod(name string, mode os.FileMode) error

func (Fs) Chown

func (s Fs) Chown(name string, uid, gid int) error

func (Fs) Chtimes

func (s Fs) Chtimes(name string, atime time.Time, mtime time.Time) error

func (Fs) Create

func (s Fs) Create(name string) (afero.File, error)

func (Fs) Lstat

func (s Fs) Lstat(p string) (os.FileInfo, error)

func (Fs) Mkdir

func (s Fs) Mkdir(name string, perm os.FileMode) error

func (Fs) MkdirAll

func (s Fs) MkdirAll(path string, perm os.FileMode) error

func (Fs) Name

func (s Fs) Name() string

func (Fs) Open

func (s Fs) Open(name string) (afero.File, error)

func (Fs) OpenFile

func (s Fs) OpenFile(name string, flag int, perm os.FileMode) (afero.File, error)

OpenFile calls the OpenFile method on the SSHFS connection. The mode argument is ignored because it's ignored by the github.com/pkg/sftp implementation.

func (Fs) Remove

func (s Fs) Remove(name string) error

func (Fs) RemoveAll

func (s Fs) RemoveAll(path string) error

func (Fs) Rename

func (s Fs) Rename(oldname, newname string) error

func (Fs) Stat

func (s Fs) Stat(name string) (os.FileInfo, error)

Jump to

Keyboard shortcuts

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