Table of Contents

Class FileSystemSettings

Namespace
WoWLib.Filesystem
Assembly
WoWLib.dll

Everything needed to open a client filesystem: where the client is, which version it is, and the optional listfile / project directory / locale configuration. An immutable value, fully described at construction — a settings object can never be half-edited into an inconsistent state. In C++ it stays an aggregate (designated initializers; const members); the scripting languages construct through the synthesized field constructor, where everything after the version is optional.

public class FileSystemSettings : IDisposable
Inheritance
FileSystemSettings
Implements
Inherited Members

Constructors

FileSystemSettings()

public FileSystemSettings()

FileSystemSettings(string, ClientVersion, Locale, string?, string?, FileDataId, string?)

public FileSystemSettings(string clientPath, ClientVersion version, Locale locale, string? projectDirectory, string? listfileCsv, FileDataId customFdidStart, string? cascProduct)

Parameters

clientPath string
version ClientVersion
locale Locale
projectDirectory string
listfileCsv string
customFdidStart FileDataId
cascProduct string

FileSystemSettings(FileSystemSettings)

Copy-construct: a deep copy of other (the C++ copy constructor).

public FileSystemSettings(FileSystemSettings other)

Parameters

other FileSystemSettings

Properties

CascProduct

TACT product code for CASC storages ('wow', 'wow_classic_era', 'wowt', ...). Left unset it is derived from the version's flavor (ClientVersion.default_casc_product), which is right for every ordinary install; set it explicitly for PTR, beta and one-off products ('wow_classic_titan'), or let ClientInstall.detect read the exact code off the installation.

public string? CascProduct { get; }

Property Value

string

ClientPath

The client installation root (the directory containing Data/).

public string ClientPath { get; }

Property Value

string

CustomFdidStart

First FileDataID handed to files added to the project; keep far above Blizzard's ~6-7M so future official content never collides.

public FileDataId CustomFdidStart { get; }

Property Value

FileDataId

ListfileCsv

public string? ListfileCsv { get; }

Property Value

string

Locale

Client locale. For MPQ clients its Data/{code}/ directory must exist; for CASC clients it is the locale mask for content selection.

public Locale Locale { get; }

Property Value

Locale

ProjectDirectory

The project-directory overlay: the ultimate patch, where new files are added. Optional.

public string? ProjectDirectory { get; }

Property Value

string

Version

The client version; selects the storage backend and MPQ chain.

public ClientVersion Version { get; }

Property Value

ClientVersion

Methods

Detect(string, Locale, string?, string?, FileDataId)

Settings for a client whose version is read off the installation itself (see ClientInstall.detect) instead of being spelled out — the reliable way to open anything Classic, where the build number decides which engine's file formats you get. The remaining arguments are the same optional configuration the constructor takes.

Example:
    ```python
    settings = FileSystemSettings.detect("/Games/World of Warcraft/_classic_era_",
                                         listfile_csv="listfile.csv")
    with FileSystem.open(settings) as fs:
        ...     # formats resolve to the engine the install really is
    ```
public static FileSystemSettings Detect(string clientPath, Locale locale, string? projectDirectory, string? listfileCsv, FileDataId customFdidStart)

Parameters

clientPath string

the installation directory holding Data/

locale Locale

client locale

projectDirectory string

the project-directory overlay

listfileCsv string

the working listfile CSV

customFdidStart FileDataId

first FileDataID for added files

Returns

FileSystemSettings

the settings, or the error ClientInstall.detect raised

Dispose()

Release the native object now. Optional: the finalizer releases it on collection anyway - dispose (or using) when you want native memory back promptly.

public virtual void Dispose()