Class FileExtract
Namespace: ValveResourceFormat.IO
Assembly: ValveResourceFormat.dll
Provides methods for extracting content files from compiled resources.
csharp
public static class FileExtractInheritance
Methods
Extract(Resource, IFileLoader, IProgress<string>?)
Extract content file from a compiled resource.
csharp
public static ContentFile Extract(Resource resource, IFileLoader fileLoader, IProgress<string>? progress = null)Parameters
resource Resource
The resource to be extracted or decompiled.
fileLoader IFileLoader
The file loader for resolving dependencies.
Optional progress reporter.
Returns
ExtractNonResource(Stream, string)
Extract content file from a non-resource stream.
csharp
public static ContentFile? ExtractNonResource(Stream stream, string fileName)Parameters
stream Stream
Stream to be extracted or decompiled.
fileName string
The file name for context.
Returns
GetExtension(Resource)
Gets the appropriate file extension for the extracted resource.
csharp
public static string GetExtension(Resource resource)Parameters
resource Resource
Returns
IsChildResource(Resource)
Determines whether the resource is a child resource.
csharp
public static bool IsChildResource(Resource resource)Parameters
resource Resource
Returns
TryExtractNonResource(Stream, string, out ContentFile?)
Attempts to extract content from a non-resource stream.
csharp
public static bool TryExtractNonResource(Stream stream, string fileName, out ContentFile? contentFile)Parameters
stream Stream
fileName string
contentFile ContentFile?

