C# 클래스 StreamUnpack, extensions

Provides unpacking behavior for steams are OPC (Open Packaging Convention) packages/zips.
파일 보기 프로젝트 열기: netfx/extensions

공개 메소드들

메소드 설명
Unpack ( this zipStream, string fileToUnpack, Stream unpacked ) : bool

From the given stream, unzips the file with the given name onto the given unpacked stream.

If the fileToUnpack is not found, nothing gets written to unpacked.

Unpack ( this zipStream, string targetDir ) : void

Unzips the given stream onto the target directory.

If the targetDir already exists, it's deleted before unzipping begins to ensure a clean destination folder.

The compressed stream must be a proper Package in term of XPS/OPC (at a minimum, have a [Content_Types].xml).

비공개 메소드들

메소드 설명
BuildTargetFileName ( string baseDir, Uri partUri ) : string
GetFileName ( string uri ) : string
ShouldUnpack ( string filePath, string filesToUnpack ) : bool

메소드 상세

Unpack() 공개 정적인 메소드

From the given stream, unzips the file with the given name onto the given unpacked stream.
If the fileToUnpack is not found, nothing gets written to unpacked.
public static Unpack ( this zipStream, string fileToUnpack, Stream unpacked ) : bool
zipStream this The stream to unpack
fileToUnpack string The file inside te pack to unpack
unpacked Stream The stream where the file will be unpacked
리턴 bool

Unpack() 공개 정적인 메소드

Unzips the given stream onto the target directory.
If the targetDir already exists, it's deleted before unzipping begins to ensure a clean destination folder.

The compressed stream must be a proper Package in term of XPS/OPC (at a minimum, have a [Content_Types].xml).

public static Unpack ( this zipStream, string targetDir ) : void
zipStream this The stream to unpack
targetDir string The target directory where stream will be unpacked
리턴 void