SevenZipAliases.

SevenZip(ICakeContext, SevenZipSettings) Method

Summary

Runs 7zip, using SevenZipSettings for configuration.
Namespace
Cake.SevenZip
Containing Type
SevenZipAliases

Syntax

[CakeMethodAlias]
public static void SevenZip(this ICakeContext context, SevenZipSettings settings)

Examples

Task("ZipIt")
    .Does(() =>
{
    SevenZip(new SevenZipSettings
    {
        Command = new AddCommand
        {
            Files = new FilePathCollection(new[] { new FilePath("a.txt"), new FilePath("b.txt") }),
            Archive = new FilePath("out.zip"),
            Volumes = new SwitchVolumeCollection(
                new SwitchVolume
                {
                    Size = 1,
                    Unit = VolumeUnit.Gigabytes
                })
        }
    });
});

Attributes

Type Description
CakeMethodAlias

Parameters

Name Type Description
context ICakeContext The ICakeContext.
settings SevenZipSettings The SevenZipSettings.

Return Value

Type Description
void
GitHub Discussion