storage

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2023 License: AGPL-3.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 Dir

type Dir struct {
	Dir string // path to the data storage directory
	// contains filtered or unexported fields
}

Dir manages data storage for the extension and user specific data on the local filesystem.

func (*Dir) Cleanup

func (d *Dir) Cleanup() error

Cleanup removes the temporary directory if Make was called with a non empty dir argument. It is named as Cleanup because it can be used for other features in the future.

func (*Dir) Make

func (d *Dir) Make(tmpDir string, dir any) error

Make creates a new temporary directory in tmpDir, and stores the path to the directory in the Dir field. When the dir argument is not empty, no directory will be created and it will not be deleted if Cleanup is called.

Jump to

Keyboard shortcuts

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