dlcache

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BasePath = filepath.Join(config.CacheDir, "dl")

BasePath stores the base path to the download cache

Functions

func Get

func Get(id string) (string, bool)

Get checks if an entry with the given ID already exists in the cache, and if so, returns the directory and true. If it does not exist, it returns an empty string and false.

func New

func New(id string) (string, error)

New creates a new directory with the given ID in the cache. If a directory with the same ID already exists, it will be deleted before creating a new one.

Types

This section is empty.

Jump to

Keyboard shortcuts

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