storage

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

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

Go to latest
Published: Feb 14, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateDir

func CreateDir(dir string) error

CreateDir creates a directory

func EraseDir

func EraseDir(dir string) error

EraseDir erases the contents of a directory taken from: https://stackoverflow.com/questions/33450980/how-to-remove-all-contents-of-a-directory-using-golang

func EraseFile

func EraseFile(file string) error

EraseFile erases the file

func Exists

func Exists(path string) bool

Exists checks if the given file or folder for a path exists

func GetUserHomeDir

func GetUserHomeDir() string

GetUserHomeDir returns the user's home directory on linux, windows or macOS taken from: https://gist.github.com/miguelmota/f30a04a6d64bd52d7ab59ea8d95e54da

func Read

func Read(name string) ([]byte, error)

Read reads data from a file

func Save

func Save(name string, data []byte) error

Save saves data to a file

func Update

func Update(name string, data []byte) error

Update updates data in a file

Types

This section is empty.

Jump to

Keyboard shortcuts

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