Unpack Method (stream, path)

Microsoft Deployment Tools

Deployment Tools Foundation Unpack Method (stream, path)
Deployment Tools Foundation NamespacesMicrosoft.Deployment.CompressionCompressionEngineUnpack(Stream, String)
Reads a single file from an archive stream.
Declaration Syntax
C# Visual Basic Visual C++
public Stream Unpack(
	Stream stream,
	string path
)
Public Function Unpack ( _
	stream As Stream, _
	path As String _
) As Stream
public:
Stream^ Unpack(
	Stream^ stream, 
	String^ path
)
Parameters
stream (Stream)
A stream for reading the archive.
path (String)
The path of the file within the archive (not the external file path).
Return Value
A stream for reading the extracted file, or null if the file does not exist in the archive.
Remarks
The entire extracted file is cached in memory, so this method requires enough free memory to hold the file.
Exceptions
Exception Condition
ArchiveException The stream is not a valid archive.

Assembly: Microsoft.Deployment.Compression (Module: Microsoft.Deployment.Compression) Version: 3.0.0.0 (3.5.1623.0)