tempstorage

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(path string) error

Add reads a file from a disk and adds it to the storage.

func RemoveAll

func RemoveAll(dir string) error

RemoveAll removes all files according to the dir argument prefix.

func SetAsStorage

func SetAsStorage(newStorage storage)

SetAsStorage changes temporary storage to newStorage.

func TempDir

func TempDir(pattern string) (string, error)

TempDir creates a name for a new temp directory using a pattern argument.

Types

type File

type File interface {
	_ca.Reader
	_ca.ReaderAt
	_ca.Writer
	_ca.Closer
	Name() string
}

File is a representation of a storage file with Read, Write, Close and Name methods identical to os.File.

func Open

func Open(path string) (File, error)

Open returns tempstorage File object by name.

func TempFile

func TempFile(dir, pattern string) (File, error)

TempFile creates new empty file in the storage and returns it.

Directories

Path Synopsis
Package memstore implements tempStorage interface by using memory as a storage
Package memstore implements tempStorage interface by using memory as a storage

Jump to

Keyboard shortcuts

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