PackFiles Method (sourceDirectory, sourceFileNames, fileNames, compLevel, progressHandler)

DTF API

Copy image CopyHover image
Deployment Tools Foundation PackFiles Method (sourceDirectory, sourceFileNames, fileNames, compLevel, progressHandler)
Deployment Tools Foundation NamespacesMicrosoft.Deployment.CompressionArchiveInfoPackFiles(String, IList<(Of <<'(String>)>>), IList<(Of <<'(String>)>>), CompressionLevel, EventHandler<(Of <<'(ArchiveProgressEventArgs>)>>))
Compresses files into the archive, specifying the names used to store the files in the archive.
Declaration Syntax
C# Visual Basic Visual C++ F#
public void PackFiles(
	string sourceDirectory,
	IList<string> sourceFileNames,
	IList<string> fileNames,
	CompressionLevel compLevel,
	EventHandler<ArchiveProgressEventArgs> progressHandler
)
Public Sub PackFiles ( 
	sourceDirectory As String,
	sourceFileNames As IList(Of String),
	fileNames As IList(Of String),
	compLevel As CompressionLevel,
	progressHandler As EventHandler(Of ArchiveProgressEventArgs)
)
public:
void PackFiles(
	String^ sourceDirectory, 
	IList<String^>^ sourceFileNames, 
	IList<String^>^ fileNames, 
	CompressionLevel compLevel, 
	EventHandler<ArchiveProgressEventArgs^>^ progressHandler
)
member PackFiles : 
        sourceDirectory : string * 
        sourceFileNames : IList<string> * 
        fileNames : IList<string> * 
        compLevel : CompressionLevel * 
        progressHandler : EventHandler<ArchiveProgressEventArgs> -> unit 
Parameters
sourceDirectory (String)
This parameter may be null, but if specified it is the root directory for any relative paths in sourceFileNames.
sourceFileNames (IList<(Of <(<'String>)>)>)
The list of files to be included in the archive.
fileNames (IList<(Of <(<'String>)>)>)
The names of the files as they are stored in the archive. Each name includes the internal path of the file, if any. This parameter may be null, in which case the files are stored in the archive with their source file names and no path information.
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
Duplicate items in the fileNames array will cause an ArchiveException.

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