filesystem

package
v0.0.0-...-8a6d2ef Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2018 License: Apache-2.0 Imports: 22 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File interface {
	io.Reader
	io.Closer
	io.Seeker
}

type FileSystem

type FileSystem interface {
	fs.FileSystem
	// Open opens a file in the filesystem
	Open(path string) (File, error)
	// Close closes the filesystem.
	// This is useful for remote filesystems, like http, or sftp
	Close() error
}

Filesystem represents a filesystem, which can be local or remote

func NewLocal

func NewLocal(u *url.URL) (FileSystem, error)

func NewNginx

func NewNginx(u *url.URL) (FileSystem, error)

func NewSFTP

func NewSFTP(u *url.URL) (FileSystem, error)

NewSFTP returns a new SFTP filesystem

func WrapJournal

func WrapJournal(inner FileSystem, journalDirName string) FileSystem

WrapTar wraps a filesystem, and show a journalctl directory on journalDirName as a log file and not as a directory.

type Local

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

func (*Local) Close

func (f *Local) Close() error

func (*Local) Join

func (f *Local) Join(elem ...string) string

func (*Local) Lstat

func (f *Local) Lstat(name string) (os.FileInfo, error)

func (*Local) Open

func (f *Local) Open(name string) (File, error)

func (*Local) ReadDir

func (f *Local) ReadDir(dirname string) ([]os.FileInfo, error)

type Nginx

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

func (*Nginx) Close

func (n *Nginx) Close() error

func (*Nginx) Join

func (n *Nginx) Join(elem ...string) string

func (*Nginx) Lstat

func (n *Nginx) Lstat(name string) (os.FileInfo, error)

func (*Nginx) Open

func (n *Nginx) Open(name string) (File, error)

func (*Nginx) ReadDir

func (n *Nginx) ReadDir(dirname string) ([]os.FileInfo, error)

type SFTP

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

SFTP represents a filesystem over an SFTP connection

func (*SFTP) Close

func (s *SFTP) Close() error

func (*SFTP) Join

func (s *SFTP) Join(elem ...string) string

func (*SFTP) Lstat

func (s *SFTP) Lstat(name string) (os.FileInfo, error)

func (*SFTP) Open

func (s *SFTP) Open(path string) (File, error)

func (*SFTP) ReadDir

func (s *SFTP) ReadDir(dirname string) ([]os.FileInfo, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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