Deployment Tools Foundation
Pack Method (streamContext, files)
Deployment Tools Foundation Namespaces ► Microsoft.Deployment.Compression ► CompressionEngine ► Pack(IPackStreamContext, IEnumerable<(Of <(String>)>))
Creates an archive.
Declaration Syntax
C# | Visual Basic | Visual C++ |
public void Pack( IPackStreamContext streamContext, IEnumerable<string> files )
Public Sub Pack ( _ streamContext As IPackStreamContext, _ files As IEnumerable(Of String) _ )
public: void Pack( IPackStreamContext^ streamContext, IEnumerable<String^>^ files )
Parameters
- streamContext (IPackStreamContext)
- A context interface to handle opening and closing of archive and file streams.
- files (IEnumerable<(Of <(String>)>))
- The paths of the files in the archive (not external file paths).
Remarks
The stream context implementation may provide a mapping from the
file paths within the archive to the external file paths.
Exceptions
Exception | Condition |
---|---|
ArchiveException | The archive could not be
created. |