Zero Install .NET API 2.20.0
ZeroInstall.Archives.Builders.ArchiveBuilder Class Reference

Builds implementation archive files. More...

Static Public Member Functions

static IArchiveBuilder Create (Stream stream, string mimeType)
 Creates a new ArchiveBuilder for creating an archive from a directory and writing it to a stream. More...
 
static IArchiveBuilder Create (string path, string mimeType)
 Creates a new ArchiveBuilder for creating an archive from a directory and writing it to a file. More...
 

Static Public Attributes

static readonly string[] SupportedMimeTypes = {Archive.MimeTypeZip, Archive.MimeTypeTar, Archive.MimeTypeTarGzip, Archive.MimeTypeTarBzip}
 All supported MIME types for creating archives. This is a subset of Archive.KnownMimeTypes
 

Detailed Description

Builds implementation archive files.

Member Function Documentation

◆ Create() [1/2]

static IArchiveBuilder ZeroInstall.Archives.Builders.ArchiveBuilder.Create ( Stream  stream,
string  mimeType 
)
inlinestatic

Creates a new ArchiveBuilder for creating an archive from a directory and writing it to a stream.

Parameters
streamThe stream to write the archive to. Will be disposed when the builder is disposed.
mimeTypeThe MIME type of archive format to create.
Exceptions
NotSupportedExceptionThe mimeType doesn't belong to a known and supported archive type.

◆ Create() [2/2]

static IArchiveBuilder ZeroInstall.Archives.Builders.ArchiveBuilder.Create ( string  path,
string  mimeType 
)
inlinestatic

Creates a new ArchiveBuilder for creating an archive from a directory and writing it to a file.

Parameters
pathThe path of the archive file to create.
mimeTypeThe MIME type of archive format to create.
Exceptions
NotSupportedExceptionThe mimeType doesn't belong to a known and supported archive type.
IOExceptionFailed to create the archive file.
UnauthorizedAccessExceptionWrite access to the archive file was denied.

The documentation for this class was generated from the following file: