Pack Method (sourceDirectory, includeSubdirectories, compLevel, progressHandler)

Microsoft Deployment Compression & Installer

Copy image CopyHover image
Deployment Tools Foundation Pack Method (sourceDirectory, includeSubdirectories, compLevel, progressHandler)
Deployment Tools Foundation NamespacesMicrosoft.Deployment.CompressionArchiveInfoPack(String, Boolean, CompressionLevel, EventHandler<(Of <<'(ArchiveProgressEventArgs>)>>))
Compresses all files in a directory into the archive, optionally including subdirectories.
Declaration Syntax
C# Visual Basic Visual C++
public void Pack(
	string sourceDirectory,
	bool includeSubdirectories,
	CompressionLevel compLevel,
	EventHandler<ArchiveProgressEventArgs> progressHandler
)
Public Sub Pack ( 
	sourceDirectory As String,
	includeSubdirectories As Boolean,
	compLevel As CompressionLevel,
	progressHandler As EventHandler(Of ArchiveProgressEventArgs)
)
public:
void Pack(
	String^ sourceDirectory, 
	bool includeSubdirectories, 
	CompressionLevel compLevel, 
	EventHandler<ArchiveProgressEventArgs^>^ progressHandler
)
Parameters
sourceDirectory (String)
This is the root directory for to pack all files.
includeSubdirectories (Boolean)
If true, recursively include files in subdirectories.
compLevel (CompressionLevel)
The compression level used when creating the archive.
progressHandler (EventHandler<(Of <(<'ArchiveProgressEventArgs>)>)>)
Handler for receiving progress information; this may be null if progress is not desired.
Remarks
The files are stored in the archive using their relative file paths in the directory tree, if supported by the archive file format.

Assembly: Microsoft.Deployment.Compression (Module: Microsoft.Deployment.Compression.dll) Version: 3.0.0.0 (3.9.1006.0)