BaseFileSystem Config { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The Config property provides access to the engine's /game/config/ folder. This folder is typically used to store configuration files that are essential for the game's operation. It is a static property of the Editor.FileSystem class, which means it can be accessed without instantiating the class.

Usage

To access the Config property, you can use the following syntax:

Sandbox.BaseFileSystem configFileSystem = Editor.FileSystem.Config;

This will give you a BaseFileSystem object that represents the /game/config/ directory, allowing you to perform file operations such as reading, writing, and listing files within this directory.

Example

// Accessing the Config file system
Sandbox.BaseFileSystem configFileSystem = Editor.FileSystem.Config;

// Example: Listing all files in the config directory
foreach (var file in configFileSystem.FindFile("*", true))
{
    // Process each file
    // For example, print the file path
    Log.Info(file);
}