unique

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2021 License: GPL-3.0, GPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package unique contains functions that compose filenames that should be unique on the filesystem.

This is useful in other Gopher2600 packages. For example, it used to generate filenames for: playback recordings, regression scripts and many other file types.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Filename

func Filename(filetype string, cartName string) string

Filename creates a filename that (assuming a functioning clock) should not collide with any existing file. Note that the function does not test for this.

Format of returned string is:

filetype_cartname_YYYYMMDD_HHMMSS

Where cartname is the string returned by cartload.ShortName(). If there is no cartridge name the returned string will be of the format:

filetype_YYYYMMDD_HHMMSS

The filetype argument is simply another way of identifying the file uniquely. For example, if saving a screenshot the filetype might simply be "screenshot" or "photo".

Types

This section is empty.

Jump to

Keyboard shortcuts

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