filestore

package
v25.0.0-split-vector3 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exists

func Exists(path string) bool

Exists returns false if the file doesn't exist. For remote storage, true does not guarantee existence

func Open

func Open(path string) (io.ReadCloser, error)

Open takes a single path and returns a io.ReadCloser, similar to os.Open

Types

type FileStore

type FileStore interface {
	// Similar to os.Open
	Open(path string) (io.ReadCloser, error)
	Exists(path string) bool
	FindDataFiles(str string, ext []string) []string
	ChunkReader(file string, key x.Sensitive) (*bufio.Reader, func())
}

FileStore represents a file or directory of files that are either stored locally or on minio/s3

func NewFileStore

func NewFileStore(path string) FileStore

NewFileStore returns a new file storage. If remote, it's backed by an x.MinioClient

Jump to

Keyboard shortcuts

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