filesystem

package
v1.8.13 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeleteOptions added in v1.8.0

type DeleteOptions struct {
	Recursive bool
	DeleteDir bool
}

type LocalStorage

type LocalStorage struct {
	BasePath string
}

func Init added in v1.8.0

func Init(options ...LocalStorageOptions) (*LocalStorage, error)

func (*LocalStorage) Delete added in v1.8.0

func (s *LocalStorage) Delete(path string, options ...DeleteOptions) error

DeleteFile removes a file from storage

func (*LocalStorage) FileExists added in v1.8.0

func (s *LocalStorage) FileExists(path string) bool

FileExists checks if a file exists

func (*LocalStorage) GetFileSize added in v1.8.0

func (s *LocalStorage) GetFileSize(path string) (int64, error)

GetFileSize returns the size of a file

func (*LocalStorage) Read added in v1.8.0

func (s *LocalStorage) Read(ctx context.Context, path string) ([]byte, error)

func (*LocalStorage) Write added in v1.8.0

func (s *LocalStorage) Write(ctx context.Context, file []byte, path string) (string, error)

type LocalStorageOptions added in v1.8.0

type LocalStorageOptions struct {
	BasePath string
}

Jump to

Keyboard shortcuts

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