directories

package
v1.11.9 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package directories interacts with the filepaths that hold both the user files for downloads and website assets.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrDir = errors.New("directory cannot be an empty value")
	ErrNil = errors.New("directories structure pointer cannot be nil")
)

Functions

func ArchiveExt

func ArchiveExt(name string) bool

ArchiveExt checks that the named file uses a known archive extension.

func PlaceHolders

func PlaceHolders(dir *Dir) error

PlaceHolders generates a collection placeholder files in the UUID subdirectories.

func Size

func Size(root string) (int64, uint64, error)

Size returns the number of counted files and their summed size as bytes.

func Touch added in v1.10.2

func Touch(name string) error

Touch creates the named file.

Types

type Dir

type Dir struct {
	Img000 string // Img000 contain record screenshots and previews.
	Img400 string // Img400 contain 400x squared thumbnails of the screenshots.
	Backup string // Backup archives for SQL data and previously removed files.
	Emu    string // Emu has the DOSee emulation files.
	Base   string // Base or root directory path, the parent of these other subdirectories.
	UUID   string // UUID file downloads.
}

Dir is the collection of directories pointing to specific files.

func Files

func Files(cfg conf.Config, name string) (Dir, error)

Files initialises the full path filenames for a UUID.

func Init

func Init(cfg conf.Config, create bool) (Dir, error)

Init initialises the subdirectories and UUID structure.

Directories

Path Synopsis
internal
create
Package create handles the making of directories.
Package create handles the making of directories.

Jump to

Keyboard shortcuts

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