Pack Method (sourceDirectory, includeSubdirectories, compLevel, progressHandler)

DTF API

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++ F#
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
)
member Pack : 
        sourceDirectory : string * 
        includeSubdirectories : bool * 
        compLevel : CompressionLevel * 
        progressHandler : EventHandler<ArchiveProgressEventArgs> -> unit 
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.11.1.2318)