SevenZipAliases.

SevenZip(ICakeContext, Action<CommandBuilder>) Method

Summary

Runs 7zip, using a fluent builder for configuration.

For more examples see the different builders for the ICommand.

Assembly
Cake.7zip.dll
Namespace
Cake.SevenZip
Containing Type
SevenZipAliases

Syntax

public static void SevenZip(this ICakeContext context, Action<CommandBuilder> action)

Examples

Task("ZipIt")
    .Does(() =>
{
    SevenZip(m => m
        .InAddMode()
        .WithArchive(File("path/to/file.zip"))
        .WithFiles(File("a.txt"))
        .WithFiles(File("b.txt"))
        .WithVolume(1, VolumeUnit.Gigabytes));
});
Task("UnzipIt")
    .Does(() =>
{
    SevenZip(m => m
      .InExtractMode()
      .WithArchive(File("path/to/file.zip"))
      .WithArchiveType(SwitchArchiveType.Zip)
      .WithOutputDirectory("some/other/directory"));
});

Attributes

Type Description
CakeMethodAliasAttribute

Parameters

Name Type Description
context ICakeContext The ICakeContext.
action Action<CommandBuilder> The fluent CommandBuilder.

Return Value

Type Description
void

See Also