Class NullFileLoader
Namespace: ValveResourceFormat.IO
Assembly: ValveResourceFormat.dll
This file loader is primarily for testing, always returns null for any file load.
public class NullFileLoader : IFileLoaderInheritance
Implements
Methods
GetFileStream(string)
Opens a stream for reading a raw (uncompiled) file, such as a loose script text file.
public Stream? GetFileStream(string file)Parameters
file string
Path to the file to read.
Returns
A readable stream, or null if not found.
Remarks
Always returns null.
LoadFile(string)
Loads a compiled resource file.
public Resource? LoadFile(string file)Parameters
file string
Path to the resource file to load.
Returns
Loaded resource, or null if not found.
Remarks
To read raw file bytes from a VPK package, use Package.ReadEntry instead.
LoadFileCompiled(string)
Same as but appends "_c" to the end of the string.
public Resource? LoadFileCompiled(string file)Parameters
file string
Path to the file to load (without _c suffix).
Returns
Loaded compiled resource, or null if not found.
Remarks
Always returns null.
LoadShader(string)
Loads a shader collection by name.
public ShaderCollection? LoadShader(string shaderName)Parameters
shaderName string
Name of the shader to load.
Returns
Loaded shader collection, or null if not found.
Remarks
Always returns null.

