fs

package
v0.0.0-...-747f32b Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2019 License: NCSA Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsDir

func IsDir(filePath string) bool

func IsFile

func IsFile(filePath string) bool

Types

type File

type File interface {
	io.ReadCloser
}

func Open

func Open(filePath string) (File, error)

type FileLocation

type FileLocation struct {
	Path string
}

func List

func List(filePath string) ([]*FileLocation, error)

func NewFileLocation

func NewFileLocation(filePath string) *FileLocation

type FileSystem

type FileSystem interface {
	Accept(*FileLocation) bool
	Open(*FileLocation) (File, error)
	List(*FileLocation) ([]*FileLocation, error)
	IsFile(*FileLocation) bool
	IsDir(*FileLocation) bool
}

type LocalFileSystem

type LocalFileSystem struct {
}

func NewLocalFileSystem

func NewLocalFileSystem() *LocalFileSystem

func (*LocalFileSystem) Accept

func (l *LocalFileSystem) Accept(loc *FileLocation) bool

func (*LocalFileSystem) IsDir

func (l *LocalFileSystem) IsDir(loc *FileLocation) bool

func (*LocalFileSystem) IsFile

func (l *LocalFileSystem) IsFile(loc *FileLocation) bool

func (*LocalFileSystem) List

func (l *LocalFileSystem) List(loc *FileLocation) ([]*FileLocation, error)

func (*LocalFileSystem) Open

func (l *LocalFileSystem) Open(loc *FileLocation) (File, error)

type MemoryFileSystem

type MemoryFileSystem struct {
	afero.Fs
}

func NewMemoryFileSystem

func NewMemoryFileSystem() *MemoryFileSystem

func (*MemoryFileSystem) Accept

func (l *MemoryFileSystem) Accept(loc *FileLocation) bool

func (*MemoryFileSystem) IsDir

func (l *MemoryFileSystem) IsDir(loc *FileLocation) bool

func (*MemoryFileSystem) IsFile

func (l *MemoryFileSystem) IsFile(loc *FileLocation) bool

func (*MemoryFileSystem) List

func (l *MemoryFileSystem) List(loc *FileLocation) ([]*FileLocation, error)

func (*MemoryFileSystem) Open

func (l *MemoryFileSystem) Open(loc *FileLocation) (File, error)

type S3FileSystem

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

func NewS3FileSystem

func NewS3FileSystem() *S3FileSystem

func (*S3FileSystem) Accept

func (l *S3FileSystem) Accept(loc *FileLocation) bool

func (*S3FileSystem) IsDir

func (l *S3FileSystem) IsDir(loc *FileLocation) bool

func (*S3FileSystem) IsFile

func (l *S3FileSystem) IsFile(loc *FileLocation) bool

func (*S3FileSystem) List

func (l *S3FileSystem) List(loc *FileLocation) ([]*FileLocation, error)

func (*S3FileSystem) Open

func (l *S3FileSystem) Open(loc *FileLocation) (File, error)

Jump to

Keyboard shortcuts

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