Documentation ¶
Index ¶
- type FileProvider
- func (fp *FileProvider) Download(ctx context.Context, fileName string) (*mrtype.File, error)
- func (fp *FileProvider) Info(ctx context.Context, fileName string) (mrtype.FileInfo, error)
- func (fp *FileProvider) Remove(ctx context.Context, fileName string) error
- func (fp *FileProvider) Upload(ctx context.Context, file *mrtype.File) error
- func (fp *FileProvider) WithBaseDir(value string) (mrstorage.ExtFileProviderAPI, error)
- type FileSystem
- type Options
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) Remove ¶ added in v0.6.8
func (fp *FileProvider) Remove(ctx context.Context, fileName string) 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)
Click to show internal directories.
Click to hide internal directories.