class

FPaths

Module
Core
Header
#include "Core/FPaths.h"
Namespace
Mowo

Public functions

ReturnsNameDescription
const std::string&EngineDirRoot of the engine checkout or install — the directory holding Engine/EngineManifest.json, with Templates/ and Samples/ beside Engine/.
std::stringEngineContentDirEngine/Content — assets shipped with the engine.
std::stringEngineSourceDirEngine/Source — source tree (Editor-only): Runtime/, Editor/, Developer/, Programs/ and ThirdParty/.
std::stringEngineModuleDirEngine/Source/<Group>/<Module> — an engine module's folder, whichever of Runtime, Editor, Developer or Programs holds it; empty when none does.
std::stringEngineThirdPartyDirEngine/Source/ThirdParty — vendored libraries' headers, rules and Lib/.
std::stringEngineConfigDirEngine/Config — the Base*.ini layer under every project's INI configs.
std::stringEngineShadersDirEngine/Shaders — the engine's HLSL.
std::stringEnginePluginsDirEngine/Plugins — the engine's own plugins.
std::stringEngineBinariesDirEngine/Binaries/<platform>/<config> — the default build of this binary's configuration (a variant build such as dev-server or debug-asan links into a sibling folder; ExecutableDir names that one).
std::stringEngineThirdPartyBinariesDirEngine/Binaries/ThirdParty/<Library>/<platform> — a vendored library's runtime files and tools (astcenc, DXC, the D3D12 Agility SDK).
std::stringThirdPartyToolExecutableA vendored tool's executable in that folder, the platform's extension added: EngineThirdPartyBinariesDir("astcenc") + "/astcenc.exe" on Windows.
std::stringEngineIntermediateDirEngine/Intermediate — disposable build output (objects, generated code).
std::stringBuildToolExecutableEngine/Source/Programs/MowoBuildTool/publish/mbt[.exe] — the published build tool every editor-driven build, cook and package runs.
std::stringTemplatesDirTemplates/ beside Engine/ — the project templates and TemplateResources/.
std::stringSamplesDirSamples/ beside Engine/.
std::stringSampleProjectFileSamples/SampleProject/SampleProject.mproject — the clean example project.
std::stringStarterContentDirSamples/StarterContent — the optional CC0 pack a new project can add.
std::stringTestProjectFileEngine/Source/Developer/MowoTestKit/Fixtures/TestProject/TestProject.mproject — the project the smokes, benches and test rows open: every test scene, golden material sidecar and design fixture lives there, not in the sample.
const std::string&ExecutableDirDirectory holding the running executable.
const std::string&GameRootDirRoot of a packaged game bundle — the directory holding Game.mproject (or the legacy game.mproject).
boolIsPackagedRunTrue when this process runs out of a packaged bundle whose root is not meant to be written (BuildInfo.json present, or the root is not writable — e.g.
voidSetPackagedRunSet by the runtime host once the shipping manifest / writability probe has run.
std::stringUserConfigScratchDirA private per-process directory standing in for every per-user config location while user config is ignored (--no-user-config, or a host that asked through SetIgnoreUserConfig); empty when user config is honoured.
voidSetIgnoreUserConfig
const std::string&ProjectDirCurrent project root — the directory containing the .mproject file loaded at startup.
std::stringProjectContentDirProject/Content — game asset source files.
std::stringProjectConfigDirProject/Config — the project tier of the tiered config.
std::stringProjectSourceDirProject/Source — the project's C++ game module.
std::stringProjectSavedDirProject/Saved — runtime-written stuff that's NOT in source control.
std::stringProjectLogsDirProject/Saved/Logs — engine writes mowo_engine.log here.
std::stringProjectCrashesDirProject/Saved/Crashes — minidumps + Sentry upload queue.
std::stringProjectAutosavesDirProject/Saved/Autosaves
std::stringProjectSaveGamesDirProject/Saved/SaveGames
std::stringProjectScreenshotsDirProject/Saved/Screenshots
std::stringProjectIntermediateDirProject/Intermediate — disposable derived output (DDC, thumbnail cache, generated code).
std::stringUserDirPer-user, per-product state root (%LOCALAPPDATA%/<Product> on Windows, XDG state dir elsewhere) — for data that follows the user across projects.
std::stringUserSaveGamesDirPer-user savegame root: <Product>/Saved/SaveGames under the state root.
std::stringUserPipelineCacheDirPer-user, per-product GPU pipeline-cache directory (<Product>/Cache under the cache root) — two games never share one cache blob.
std::stringCombineSingle forward-slash separator, no trailing slash on the result.
std::stringStripExtensionDrops everything from the last '.'; returns the input unchanged when there is no '.'.
std::stringGetExtensionThe extension including the leading dot (".png"); empty when the clean filename has no '.'.
std::stringGetLowerExtensionGetExtension folded to ASCII lower case, for matching against the file-type table.
std::stringGetStemThe clean filename with its extension dropped ("Textures/foo.png" -> "foo").
std::stringGetCleanFilenameThe part after the last slash.
std::stringGetPathThe part before the last slash.
std::stringNormalizeSeparatorsEvery '\' becomes '/'.
voidSetProjectDirPass an absolute path; every Project*Dir call afterwards derives from it.

Function details

EngineDir

C++
static const std::string& EngineDir()

Root of the engine checkout or install — the directory holding Engine/EngineManifest.json, with Templates/ and Samples/ beside Engine/. Walks up from the program path (Engine/Binaries/<platform>/<config>/), then from the working directory; the working directory itself when neither finds it.

EngineContentDir

C++
static std::string EngineContentDir()

Engine/Content — assets shipped with the engine.

EngineSourceDir

C++
static std::string EngineSourceDir()

Engine/Source — source tree (Editor-only): Runtime/, Editor/, Developer/, Programs/ and ThirdParty/.

EngineModuleDir

C++
static std::string EngineModuleDir(std::string_view moduleName)

Engine/Source/<Group>/<Module> — an engine module's folder, whichever of Runtime, Editor, Developer or Programs holds it; empty when none does.

EngineThirdPartyDir

C++
static std::string EngineThirdPartyDir()

Engine/Source/ThirdParty — vendored libraries' headers, rules and Lib/.

EngineConfigDir

C++
static std::string EngineConfigDir()

Engine/Config — the Base*.ini layer under every project's INI configs.

EngineShadersDir

C++
static std::string EngineShadersDir()

Engine/Shaders — the engine's HLSL.

EnginePluginsDir

C++
static std::string EnginePluginsDir()

Engine/Plugins — the engine's own plugins.

EngineBinariesDir

C++
static std::string EngineBinariesDir()

Engine/Binaries/<platform>/<config> — the default build of this binary's configuration (a variant build such as dev-server or debug-asan links into a sibling folder; ExecutableDir names that one).

EngineThirdPartyBinariesDir

C++
static std::string EngineThirdPartyBinariesDir(std::string_view library)

Engine/Binaries/ThirdParty/<Library>/<platform> — a vendored library's runtime files and tools (astcenc, DXC, the D3D12 Agility SDK).

ThirdPartyToolExecutable

C++
static std::string ThirdPartyToolExecutable(std::string_view library, std::string_view tool)

A vendored tool's executable in that folder, the platform's extension added: EngineThirdPartyBinariesDir("astcenc") + "/astcenc.exe" on Windows.

EngineIntermediateDir

C++
static std::string EngineIntermediateDir()

Engine/Intermediate — disposable build output (objects, generated code).

BuildToolExecutable

C++
static std::string BuildToolExecutable()

Engine/Source/Programs/MowoBuildTool/publish/mbt[.exe] — the published build tool every editor-driven build, cook and package runs.

TemplatesDir

C++
static std::string TemplatesDir()

Templates/ beside Engine/ — the project templates and TemplateResources/.

SamplesDir

C++
static std::string SamplesDir()

Samples/ beside Engine/.

SampleProjectFile

C++
static std::string SampleProjectFile()

Samples/SampleProject/SampleProject.mproject — the clean example project.

StarterContentDir

C++
static std::string StarterContentDir()

Samples/StarterContent — the optional CC0 pack a new project can add.

TestProjectFile

C++
static std::string TestProjectFile()

Engine/Source/Developer/MowoTestKit/Fixtures/TestProject/TestProject.mproject — the project the smokes, benches and test rows open: every test scene, golden material sidecar and design fixture lives there, not in the sample.

ExecutableDir

C++
static const std::string& ExecutableDir()

Directory holding the running executable. Unlike everything else here it never consults the working directory, so it is the right anchor for a packaged game's own files — those must resolve however the player launched the exe.

GameRootDir

C++
static const std::string& GameRootDir()

Root of a packaged game bundle — the directory holding Game.mproject (or the legacy game.mproject). Probes the working directory, the executable dir, and up to two parents of the executable dir (the packaged host lives in <root>/Binaries/<platform>/). Empty when no packaged root is found (dev tree, editor).

IsPackagedRun

C++
static bool IsPackagedRun()

True when this process runs out of a packaged bundle whose root is not meant to be written (BuildInfo.json present, or the root is not writable — e.g. Program Files). Saved/ + derived data then route to the per-user product dirs instead of the install dir.

SetPackagedRun

C++
static void SetPackagedRun(bool packaged)

Set by the runtime host once the shipping manifest / writability probe has run.

UserConfigScratchDir

C++
static std::string UserConfigScratchDir()

A private per-process directory standing in for every per-user config location while user config is ignored (--no-user-config, or a host that asked through SetIgnoreUserConfig); empty when user config is honoured. A test run reads the same defaults on every machine and writes nothing the next run, or the user, will pick up.

SetIgnoreUserConfig

C++
static void SetIgnoreUserConfig(bool ignore)

ProjectDir

C++
static const std::string& ProjectDir()

Current project root — the directory containing the .mproject file loaded at startup. Empty when no project is loaded (--no-project / Launcher-only mode).

ProjectContentDir

C++
static std::string ProjectContentDir()

Project/Content — game asset source files.

ProjectConfigDir

C++
static std::string ProjectConfigDir()

Project/Config — the project tier of the tiered config.

ProjectSourceDir

C++
static std::string ProjectSourceDir()

Project/Source — the project's C++ game module.

ProjectSavedDir

C++
static std::string ProjectSavedDir()

Project/Saved — runtime-written stuff that's NOT in source control. Logs, crashes, autosaves, savegames, screenshots.

ProjectLogsDir

C++
static std::string ProjectLogsDir()

Project/Saved/Logs — engine writes mowo_engine.log here.

ProjectCrashesDir

C++
static std::string ProjectCrashesDir()

Project/Saved/Crashes — minidumps + Sentry upload queue.

ProjectAutosavesDir

C++
static std::string ProjectAutosavesDir()

Project/Saved/Autosaves

ProjectSaveGamesDir

C++
static std::string ProjectSaveGamesDir()

Project/Saved/SaveGames

ProjectScreenshotsDir

C++
static std::string ProjectScreenshotsDir()

Project/Saved/Screenshots

ProjectIntermediateDir

C++
static std::string ProjectIntermediateDir()

Project/Intermediate — disposable derived output (DDC, thumbnail cache, generated code). Safe to delete at any time.

UserDir

C++
static std::string UserDir()

Per-user, per-product state root (%LOCALAPPDATA%/<Product> on Windows, XDG state dir elsewhere) — for data that follows the user across projects. Re-resolves when AppDataPath::SetProductName changes.

UserSaveGamesDir

C++
static std::string UserSaveGamesDir()

Per-user savegame root: <Product>/Saved/SaveGames under the state root. A packaged game writes here directly; the editor/PIE adds a per-project subdirectory (see SaveGameManager::GetSaveDir).

UserPipelineCacheDir

C++
static std::string UserPipelineCacheDir()

Per-user, per-product GPU pipeline-cache directory (<Product>/Cache under the cache root) — two games never share one cache blob.

Combine

C++
static std::string Combine(std::string_view a, std::string_view b)

Single forward-slash separator, no trailing slash on the result.

StripExtension

C++
static std::string StripExtension(std::string_view path)

Drops everything from the last '.'; returns the input unchanged when there is no '.'.

GetExtension

C++
static std::string GetExtension(std::string_view path)

The extension including the leading dot (".png"); empty when the clean filename has no '.'. A '.' in a parent directory is ignored.

GetLowerExtension

C++
static std::string GetLowerExtension(std::string_view path)

GetExtension folded to ASCII lower case, for matching against the file-type table.

GetStem

C++
static std::string GetStem(std::string_view path)

The clean filename with its extension dropped ("Textures/foo.png" -> "foo").

GetCleanFilename

C++
static std::string GetCleanFilename(std::string_view path)

The part after the last slash.

GetPath

C++
static std::string GetPath(std::string_view path)

The part before the last slash.

NormalizeSeparators

C++
static std::string NormalizeSeparators(std::string path)

Every '\' becomes '/'. A path that came back from std::filesystem on Windows carries the host separator, and a path used as a MAP KEY — the asset registry's path index, a redirect's old path — then fails to match the same path spelled the engine's way.

SetProjectDir

C++
static void SetProjectDir(std::string absoluteDir)

Pass an absolute path; every Project*Dir call afterwards derives from it. Empty string resets to "no project loaded".

Generated from Core/FPaths.h via core.json · Nov 5, 2026Version 1.0.0