Documentation
¶
Overview ¶
Package paths contains functions to prepare paths for gopher2600 resources.
The ResourcePath() function returns the correct path to the resource directory/file specified in the arguments. The result of ResourcePath depends on the build tag used to compile the program.
For "release" tagged builds, the correct path is one 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" tagged builds, the correct path is rooted in the current working directory:
.gopher2600
The reason for this is simple. During development, it is more convenient to have the config directory close to hand. For release binaries meanwhile, the config directory should be somewhere the user expects.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ResourcePath ¶
ResourcePath returns the resource string (representing the resource to be loaded) prepended with OS/build specific paths.
The function takes care of creation of all folders necessary to reach the end of sub-path. It does not otherwise touch or create the file.
Either subPth or file can be empty, depending on context.
Types ¶
This section is empty.