Overview
TheFileSystem class provides an abstraction layer for accessing Frostbite game file systems. It handles path resolution, catalog enumeration, superbundle management, and the InitFS memory file system.
Constructor
constructor
Creates a new FileSystem instance for a game installation
string
required
Path to the game installation directoryExample:
@"C:\Program Files (x86)\Origin Games\Battlefield 5"Initialization
void
Initializes the file system by loading layout.toc and initfsThis method:
byte[]
default:"null"
Encryption key for games that use encrypted InitFS
- Processes layout.toc (base and patch)
- Loads catalogs from install manifest
- Loads InitFS memory file system
- Merges patch and base data
Properties
string
Game installation directory path
string
Path to the cache file for this profile
uint
Base version number from layout.toc
uint
Head version number from layout.toc (current patch level)
int
Total number of superbundles
IEnumerable<string>
Enumerable collection of all superbundle names
int
Total number of catalogs
IEnumerable<string>
Enumerable collection of all catalog names
Path Resolution
string
Resolves a game-relative path to an absolute file system pathReturns: Absolute file system path, or empty string if not foundSupported prefixes:
string
required
Game-relative path using forward slashes
native_data/- Base game datanative_patch/- Patch data- No prefix - Searches both locations
string
Catalog Management
string
Gets the catalog name from a ManifestFileRef
IEnumerable<CatalogInfo>
Enumerates detailed catalog informationCatalogInfo Properties:
Id(Guid) - Unique catalog identifierName(string) - Catalog path nameAlwaysInstalled(bool) - Whether catalog is requiredSuperBundles(Dictionary<string, bool>) - SuperBundles in this catalog
InitFS / Memory File System
InitFS is a virtual file system stored ininitfs_win32 that contains configuration files, scripts, and other data.
byte[]
Gets file data from the memory file systemReturns: File data, or
string
required
File path in InitFS
null if not foundIEnumerable<string>
Enumerates all files in the memory file systemCommon InitFS files:
Scripts/- Configuration and script filesDictionaries/- Decompression dictionariesProfiles/- Profile definitions- Various configuration files
Source Management
void
Manifest Operations
IEnumerable<DbObject>
Enumerates bundle data from manifestOnly available for games using manifest-based loading (FIFA 19+, Anthem, etc.)
ManifestBundleInfo
ManifestChunkInfo
Gets manifest chunk information by GUID
Utility Methods
ManifestFileRef
Gets a ManifestFileRef from an absolute path
string
Gets the file path for a CAS file
IDeobfuscator
Creates a deobfuscator instance for this gameUsed internally for reading obfuscated files like layout.toc
Usage Examples
Game-Specific Behavior
Different Frostbite games use different file system layouts: Legacy Games (BF4, DAI, NFS, etc.)- Single
Datadirectory - Simple catalog structure
- No manifest system
- Install chunks/packages
- Manifest-based loading
- Split superbundles across catalogs
- May use encryption
- Uses
.dasfiles instead of CAS - Special DAS/DAL file format
See Also
- ResourceManager API - Resource data loading
- AssetManager API - Asset management
- FrostySdk Namespace - Core types and utilities