loader

package
v0.0.0-...-4c7982d Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2023 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LocalFileList

type LocalFileList struct {
	// Path is the main folder to start look from
	Path string
}

LocalFileList loads file list from local disk dir.

func NewLocalFileList

func NewLocalFileList(path string) (*LocalFileList, error)

NewLocalFileList creates LocalFileList instance.

func (*LocalFileList) List

func (fs *LocalFileList) List(dir string) ([]string, error)

List returns file list in directory

type LocalFileLoader

type LocalFileLoader struct {
	// StoragePath is the main folder to save into
	Path         string
	OpenFileFunc OpenFileFunc
}

LocalFileLoader loads file on local disk

func NewLocalFileLoader

func NewLocalFileLoader(path string) (*LocalFileLoader, error)

NewLocalFileLoader creates LocalFileLoader instance

func (LocalFileLoader) Load

func (fs LocalFileLoader) Load(name string) (api.File, error)

Load loads file from disk

type NonEmptyFileTester

type NonEmptyFileTester struct {
	Path string
	// contains filtered or unexported fields
}

NonEmptyFileTester test if file is empty

func NewNonEmptyFileTester

func NewNonEmptyFileTester(path string) (*NonEmptyFileTester, error)

NewNonEmptyFileTester creates NonEmptyFileTester instance

func (*NonEmptyFileTester) Test

func (fs *NonEmptyFileTester) Test(id string) (bool, error)

Test tests if file is not empty

type OpenFileFunc

type OpenFileFunc func(fileName string) (api.File, error)

OpenFileFunc declares function to open file by name and return Reader

Jump to

Keyboard shortcuts

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