Content paths
Generated from engine/app/content_root.h at 862e08b. The text under each declaration is the header's own comment, word for word. About the reference says how these pages are made.
#include "engine/app/content_root.h" · namespace labrador
Where a game's content is, settled once, here, in the shell.
THE WORKING DIRECTORY IS NOT AN ANSWER. A relative path handed to the C runtime is resolved against wherever the process happened to be started from: the build directory, which has the content beside the executable because the build copies it there, or equally the repository root, a shortcut, a debugger with its own idea of a start directory, or a file manager, which do not. A game has to open its content from all of them.
THE POLICY IS TWO SENTENCES. A relative manifest path is relative to the directory the executable was loaded from, which is where a build puts the content and where an installer does too. A relative directory inside the manifest is relative to the manifest, so a manifest and its folders move together and the file reads the same wherever it sits. An absolute path anywhere is left alone, for the game that keeps its content somewhere deliberate.
IT LIVES IN app/ AND NOT IN assets/, on purpose. The loader hands a directory straight through from the file to the kind that opens it, and its tests pin that it does; where the file is relative TO is a question about the process, and the shell is the module that is allowed to ask the machine one (application.h, default_thread_count). Application::load_manifest applies both sentences; these are the pieces, public so that a game with its own loading order can apply them itself, and so that they are testable without a window.
executable_directory
Section titled “executable_directory”All content path strings in this API are UTF-8. The directory the running executable was loaded from, with a trailing separator, so that a relative path appended to it is a path.
resolved_under
Section titled “resolved_under” const std::string& path);path itself if it is absolute, and otherwise directory + path. directory is expected to end in a separator, as executable_directory does; one is added if it does not.
anchored_to_source
Section titled “anchored_to_source”The same manifest with every relative directory resolved under the directory of the file it was read from (AssetManifest::source_path), so the loader opens the folders beside the manifest rather than the folders beside the process. A manifest with no source path is left as it is: there is nothing to anchor to.
Related types
Section titled “Related types”Named in the public declarations above: AssetManifest.
In the samples and tests
Section titled “In the samples and tests”The files that include this header directly. A file can also reach it through another header.
samples/audio/smoke_test.cpptests/app/content_root_tests.cpp
Development documentation (unreleased). Built from Labrador 862e08b of 2026-10-08.