ftpfs

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(client *ftp.ServerConn) afero.Fs

Types

type File

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

func FileCreate

func FileCreate(fs *Fs, name string) (*File, error)

func FileOpen

func FileOpen(fs *Fs, 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)

TODO

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 FileInfo

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

func (FileInfo) IsDir

func (info FileInfo) IsDir() bool

abbreviation for Mode().IsDir()

func (FileInfo) ModTime

func (info FileInfo) ModTime() time.Time

modification time

func (FileInfo) Mode

func (info FileInfo) Mode() os.FileMode

file mode bits

func (FileInfo) Name

func (info FileInfo) Name() string

base name of the file

func (FileInfo) Size

func (info FileInfo) Size() int64

length in bytes for regular files; system-dependent for others

func (FileInfo) Sys

func (info FileInfo) Sys() interface{}

underlying data source (can return nil)

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 FtpConnect

func FtpConnect(user, password, host string) (*Fs, error)

func (Fs) Chmod

func (s Fs) Chmod(name string, mode os.FileMode) 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) Disconnect

func (s Fs) Disconnect()

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)

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