EntropyEngine::VirtualFileSystem
EntropyEngine::VirtualFileSystem
Section titled “EntropyEngine::VirtualFileSystem”Functions
Section titled “Functions”| Name | |
|---|---|
| std::optional< std::string > | getResourcesPath() Get the application’s resources directory (cross-platform). |
| std::optional< std::string > | getResourceFilePath(const std::string & relativePath) Get the full path to a resource file. |
| std::optional< std::string > | getExecutablePath() Get the full path to the executable. |
| std::optional< std::string > | getExecutableDirectory() Get the directory containing the executable. |
| std::optional< std::string > | getAppDataPath(const std::string & appName) Get platform-appropriate app data directory. |
| std::optional< std::string > | getAppCachePath(const std::string & appName) Get platform-appropriate app cache directory. |
Functions Documentation
Section titled “Functions Documentation”function getResourcesPath
Section titled “function getResourcesPath”std::optional< std::string > getResourcesPath()Get the application’s resources directory (cross-platform).
Return: Absolute path to resources directory, or nullopt on failure
Platform behavior:
- macOS App Bundle: Returns MyApp.app/Contents/Resources/
- macOS CLI/Windows/Linux: Returns directory containing the executable
function getResourceFilePath
Section titled “function getResourceFilePath”std::optional< std::string > getResourceFilePath( const std::string & relativePath)Get the full path to a resource file.
Parameters:
- relativePath Path relative to resources directory (e.g., “Shaders/blit.slang”)
Return: Absolute path to the resource file, or nullopt on failure
function getExecutablePath
Section titled “function getExecutablePath”std::optional< std::string > getExecutablePath()Get the full path to the executable.
Return: Absolute path to executable, or nullopt on failure
function getExecutableDirectory
Section titled “function getExecutableDirectory”std::optional< std::string > getExecutableDirectory()Get the directory containing the executable.
Return: Absolute path to executable’s directory, or nullopt on failure
function getAppDataPath
Section titled “function getAppDataPath”std::optional< std::string > getAppDataPath( const std::string & appName)Get platform-appropriate app data directory.
Parameters:
- appName Application name (used as subdirectory)
Return: Absolute path to app data directory, or nullopt on failure
Platform behavior:
- macOS: ~/Library/Application Support/{appName}/
- Linux: $XDG_DATA_HOME/{appName}/ or ~/.local/share/{appName}/
- Windows: APPDATAappName}\
function getAppCachePath
Section titled “function getAppCachePath”std::optional< std::string > getAppCachePath( const std::string & appName)Get platform-appropriate app cache directory.
Parameters:
- appName Application name (used as subdirectory)
Return: Absolute path to app cache directory, or nullopt on failure
Platform behavior:
- macOS: ~/Library/Caches/{appName}/
- Linux: $XDG_CACHE_HOME/{appName}/ or ~/.cache/{appName}/
- Windows: LOCALAPPDATAappName}\
Updated on 2026-01-26 at 17:14:35 -0500