my.resource

Members

Aliases

ResourceFile
alias ResourceFile = NamedType!(AbsolutePath, Tag!"ResourceFile", AbsolutePath.init, TagStringable)
Undocumented in source.

Functions

configSearch
AbsolutePath[] configSearch(string programName)

Search order is the users home directory, beside the binary followed by XDG config dir.

dataSearch
AbsolutePath[] dataSearch(string programName)

Search order is the users home directory, beside the binary followed by XDG data dir.

readResource
string readResource(ResourceFile r)

A convenient function to read a file as a text string from a resource.

resolve
Optional!ResourceFile resolve(AbsolutePath[] searchIn, Path lookFor)

Look for lookFor in searchIn by checking if the file exists at buildPath(searchIn[i],lookFor).

Meta

Authors

Joakim Brännström (joakim.brannstrom@gmx.com)

Convenient functions for accessing files via a priority list such that there are defaults installed in e.g. /etc while a user can override them in their home directory.