directories

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: May 13, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package directories interacts with the filepaths that hold files and assets.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrPathIsFile = errors.New("path already exist as a file")
	ErrPrefix     = errors.New("invalid prefix value, it must be between 0 - 9")
)

Functions

func ArchiveExt added in v1.1.32

func ArchiveExt(name string) bool

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

func Size added in v1.1.23

func Size(dir string) (count int64, bytes uint64, err error)

Types

type Dir

type Dir struct {
	Img000 string // path to screencaptures and previews
	Img150 string // path to 150x150 squared thumbnails
	Img400 string // path to 400x400 squared thumbnails
	Backup string // path to the backup archives or previously removed files
	Emu    string // path to the DOSee emulation files
	Base   string // base directory path that hosts these other subdirectories
	UUID   string // path to file downloads with UUID as filenames
}

Dir is a collection of paths containing files.

func Files

func Files(name string) (dirs Dir)

Files initialises the full path filenames for a UUID.

func Init

func Init(create bool) Dir

Init initialises the subdirectories and UUID structure.

Jump to

Keyboard shortcuts

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