Player12
An open source football management simulator
Loading...
Searching...
No Matches
RuntimePaths Class Reference

#include <runtime_paths.h>

Static Public Member Functions

static std::filesystem::path root ()
 
static std::filesystem::path saveDirectory ()
 
static std::filesystem::path savePath (int slot)
 
static std::filesystem::path settingsPath ()
 
static std::filesystem::path logPath ()
 
static std::filesystem::path previousLogPath ()
 
static std::filesystem::path capturePath (const char *filename)
 
static std::filesystem::path imguiIniPath ()
 
static const std::filesystem::path & assetRoot ()
 
static void removeSave (int slot)
 
static void removeAllSaves ()
 

Detailed Description

Runtime locations for files that must never be written into game assets.

Member Function Documentation

◆ assetRoot()

const std::filesystem::path & RuntimePaths::assetRoot ( )
static

Read-only data root: the directory that contains assets/. FM_ASSET_ROOT overrides; otherwise the first of <exe>/../share/footballmanagement (Linux install), <exe>/../Resources (macOS bundle) or <exe> (Windows, portable) holding the assets, falling back to the source checkout. Resolved once per process.

◆ capturePath()

std::filesystem::path RuntimePaths::capturePath ( const char *  filename)
static

◆ imguiIniPath()

std::filesystem::path RuntimePaths::imguiIniPath ( )
static

◆ logPath()

std::filesystem::path RuntimePaths::logPath ( )
static

◆ previousLogPath()

std::filesystem::path RuntimePaths::previousLogPath ( )
static

The log of the previous session, kept by Logger::init().

◆ removeAllSaves()

void RuntimePaths::removeAllSaves ( )
static

◆ removeSave()

void RuntimePaths::removeSave ( int  slot)
static

Removes only save files owned by this runtime root, including WAL files.

◆ root()

std::filesystem::path RuntimePaths::root ( )
static

Returns the writable root. FM_RUNTIME_ROOT is an explicit test/automation override; otherwise SDL's platform-specific preference location is used. FM_TEST_RUNTIME_ROOT gives each process its own <root>/<pid> directory, removed at process exit unless FM_KEEP_TEST_ARTIFACTS is set (non-"0").

◆ saveDirectory()

std::filesystem::path RuntimePaths::saveDirectory ( )
static

◆ savePath()

std::filesystem::path RuntimePaths::savePath ( int  slot)
static

◆ settingsPath()

std::filesystem::path RuntimePaths::settingsPath ( )
static

The documentation for this class was generated from the following files: