Filesystem - Steelhead-Games/CharmQuarkEngine-wiki GitHub Wiki

The class that describes the file system logic is called FileSystem. It lives in the Core module. The FileSystem global variable, called g_FileSystem, is responsible for the main game/engine filesystem. At this moment, there is no reason to create more than one filesystem, but we'll see

How to use the FileSystem class

This class looks for a file in the corresponding Assets folder, which can be located either in the engine directory or the game directory. To specify which directory it should be, the path should contain either game:/ or engine:/ prefix.

Example

In the project SimpleScene, when the next code is executed

Core::g_FileSystem->GetPath("game:/Configs/Input_default.ini");

it returns the path to CharmQuarkEngine/Samples/SimpleScene/Assets/Configs/Input_default.ini