resources

package
v0.30.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package resources contains functions to prepare paths for gopher2600 resources.

The JoinPath() function returns the correct path to the resource directory/file specified in the arguments. It handles the creation of directories as required but does not otherwise touch or create files.

JoinPath() handles the inclusion of the correct base path. The base path depends on how the binary was built.

For builds with the "releas" build tag, the path returned by JoinPath() is rooted in the user's configuration directory. On modern Linux systems the full path would be something like:

/home/user/.config/gopher2600/

For non-"release" builds, the correct path is rooted in the current working directory:

.gopher2600

The package does this because during development it is more convenient to have the config directory close to hand. For release binaries however, the config directory should be somewhere the end-user expects.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JoinPath

func JoinPath(path ...string) (string, error)

JoinPath prepends the supplied path with a with OS/build specific base paths, if required.

The function creates all folders necessary to reach the end of sub-path. It does not otherwise touch or create the file.

Types

This section is empty.

Directories

Path Synopsis
Package fs is an abstraction for OS/filesystem functions that may be missing or require special handling.
Package fs is an abstraction for OS/filesystem functions that may be missing or require special handling.
Package unique contains functions that compose filenames that should be unique on the filesystem.
Package unique contains functions that compose filenames that should be unique on the filesystem.

Jump to

Keyboard shortcuts

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