fileio

package
v14.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OSFile

type OSFile struct{}

OSFile provides a storage based on Go's standard "os" package for filesystem support.

func (*OSFile) MkdirAll

func (*OSFile) MkdirAll(path string, perm os.FileMode) error

func (*OSFile) NotExist

func (*OSFile) NotExist(name string) (bool, error)

func (*OSFile) ReadFile

func (*OSFile) ReadFile(name string) ([]byte, error)

func (*OSFile) WriteFile

func (*OSFile) WriteFile(name string, data []byte, perm os.FileMode) error

type S3Storage

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

func NewAWS

func NewAWS(s3Client *s3.Client) *S3Storage

func (*S3Storage) MkdirAll

func (f *S3Storage) MkdirAll(path string, perm os.FileMode) error

func (*S3Storage) NotExist

func (f *S3Storage) NotExist(name string) (bool, error)

func (*S3Storage) ReadFile

func (f *S3Storage) ReadFile(name string) ([]byte, error)

func (*S3Storage) WriteFile

func (f *S3Storage) WriteFile(name string, data []byte, _ os.FileMode) error

TODO: instead of `data []byte`, we could use an io.Writer TODO: use an options style functional param instead of `_ os.FileMode`

Jump to

Keyboard shortcuts

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