Table of Contents

Class FileExtract

Namespace
ValveResourceFormat.IO
Assembly
ValveResourceFormat.dll

Provides methods for extracting content files from compiled resources.

public static class FileExtract

Inheritance

Inherited Members

Methods

Extract(Resource, IFileLoader, IProgress<string>)

Extract content file from a compiled resource.

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.

progress IProgress<string>

Optional progress reporter.

Returns

ContentFile

ExtractNonResource(Stream, string)

Extract content file from a non-resource stream.

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

ContentFile

GetExtension(Resource)

Gets the appropriate file extension for the extracted resource.

public static string GetExtension(Resource resource)

Parameters

resource Resource

Returns

string

IsChildResource(Resource)

Determines whether the resource is a child resource.

public static bool IsChildResource(Resource resource)

Parameters

resource Resource

Returns

bool

TryExtractNonResource(Stream, string, out ContentFile)

Attempts to extract content from a non-resource stream.

public static bool TryExtractNonResource(Stream stream, string fileName, out ContentFile contentFile)

Parameters

stream Stream
fileName string
contentFile ContentFile

Returns

bool