mrfilestorage

package
v0.6.12 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileProvider added in v0.6.8

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

func NewFileProvider added in v0.6.8

func NewFileProvider(fs *FileSystem, rootDir string) *FileProvider

func (*FileProvider) Download added in v0.6.8

func (fp *FileProvider) Download(ctx context.Context, fileName string) (*mrtype.File, error)

func (*FileProvider) Info added in v0.6.8

func (fp *FileProvider) Info(ctx context.Context, fileName string) (mrtype.FileInfo, error)

func (*FileProvider) Remove added in v0.6.8

func (fp *FileProvider) Remove(ctx context.Context, fileName string) error

func (*FileProvider) Upload added in v0.6.8

func (fp *FileProvider) Upload(ctx context.Context, file *mrtype.File) error

func (*FileProvider) WithBaseDir added in v0.6.8

func (fp *FileProvider) WithBaseDir(value string) (mrstorage.ExtFileProviderAPI, error)

type FileSystem added in v0.6.8

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

func New

func New(opt Options) *FileSystem

func (*FileSystem) CreateDirIfNotExists added in v0.6.8

func (f *FileSystem) CreateDirIfNotExists(rootDir string, dirPath string) error

func (*FileSystem) InitRootDir added in v0.6.8

func (f *FileSystem) InitRootDir(path string) (bool, error)

type Options added in v0.6.8

type Options struct {
	DirMode    os.FileMode
	CreateDirs bool
}

Jump to

Keyboard shortcuts

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