ExtractCommand Class

Summary

Extract files from archive - with or without full path (Commands: e and x).

With UseFullPath set to false, this represents the e-command: Extracts files from an archive to the current directory or to the output directory. The output directory can be specified by -o (Set Output Directory) switch. This command copies all extracted files to one directory.

With UseFullPath set to true, this represents the x-command: Extracts files from an archive with their full paths in the current directory, or in an output directory if specified.

The builder is ExtractCommandBuilder.

graph BT Type-->Base0["BaseCommand"] click Base0 "/api/Cake.SevenZip.Commands/BaseCommand" Base0-->Base1["Object"] Type-.->Interface0["ICommand"] click Interface0 "/api/Cake.SevenZip.Commands/ICommand" Type-.->Interface1["IHaveArgumentArchive"] click Interface1 "/api/Cake.SevenZip.Arguments/IHaveArgumentArchive" Type-.->Interface2["IHaveArgument"] click Interface2 "/api/Cake.SevenZip.Arguments/IHaveArgument" Type-.->Interface3["ISupportSwitchIncludeFilenames"] click Interface3 "/api/Cake.SevenZip.Switches/ISupportSwitchIncludeFilenames" Type-.->Interface4["ISupportSwitchCompressionMethod"] click Interface4 "/api/Cake.SevenZip.Switches/ISupportSwitchCompressionMethod" Type-.->Interface5["ISupportSwitchPassword"] click Interface5 "/api/Cake.SevenZip.Switches/ISupportSwitchPassword" Type-.->Interface6["ISupportSwitchRecurseSubdirectories"] click Interface6 "/api/Cake.SevenZip.Switches/ISupportSwitchRecurseSubdirectories" Type-.->Interface7["ISupportSwitchNtSecurityInformation"] click Interface7 "/api/Cake.SevenZip.Switches/ISupportSwitchNtSecurityInformation" Type-.->Interface8["ISupportSwitchNtfsAlternateStreams"] click Interface8 "/api/Cake.SevenZip.Switches/ISupportSwitchNtfsAlternateStreams" Type-.->Interface9["ISupportSwitchExcludeFilenames"] click Interface9 "/api/Cake.SevenZip.Switches/ISupportSwitchExcludeFilenames" Type-.->Interface10["ISupportSwitchArchiveType"] click Interface10 "/api/Cake.SevenZip.Switches/ISupportSwitchArchiveType" Type-.->Interface11["ISupportSwitchIncludeArchiveFilenames"] click Interface11 "/api/Cake.SevenZip.Switches/ISupportSwitchIncludeArchiveFilenames" Type-.->Interface12["ISupportSwitchExcludeArchiveFilenames"] click Interface12 "/api/Cake.SevenZip.Switches/ISupportSwitchExcludeArchiveFilenames" Type-.->Interface13["ISupportSwitchDisableParsingOfArchiveName"] click Interface13 "/api/Cake.SevenZip.Switches/ISupportSwitchDisableParsingOfArchiveName" Type-.->Interface14["ISupportSwitchOverwriteMode"] click Interface14 "/api/Cake.SevenZip.Switches/ISupportSwitchOverwriteMode" Type-.->Interface15["ISupportSwitchOutputDirectory"] click Interface15 "/api/Cake.SevenZip.Switches/ISupportSwitchOutputDirectory" Type-.->Interface16["ISupportSwitchFullyQualifiedFilePaths"] click Interface16 "/api/Cake.SevenZip.Switches/ISupportSwitchFullyQualifiedFilePaths" Type-.->Interface17["ISupportSwitch"] click Interface17 "/api/Cake.SevenZip.Switches/ISupportSwitch" Type["ExtractCommand"] class Type type-node

Syntax

public sealed class ExtractCommand : BaseCommand, ICommand, IHaveArgumentArchive, IHaveArgument, 
    ISupportSwitchIncludeFilenames, ISupportSwitchCompressionMethod, ISupportSwitchPassword, 
    ISupportSwitchRecurseSubdirectories, ISupportSwitchNtSecurityInformation, 
    ISupportSwitchNtfsAlternateStreams, ISupportSwitchExcludeFilenames, ISupportSwitchArchiveType, 
    ISupportSwitchIncludeArchiveFilenames, ISupportSwitchExcludeArchiveFilenames, 
    ISupportSwitchDisableParsingOfArchiveName, ISupportSwitchOverwriteMode, 
    ISupportSwitchOutputDirectory, ISupportSwitchFullyQualifiedFilePaths, ISupportSwitch

Attributes

Type Description
NullableContextAttribute
NullableAttribute

Constructors

Name Summary
ExtractCommand() Initializes a new instance of the ExtractCommand class.

Properties

Name Value Summary
Archive FilePath
Sets the archive the command operates on.
ArchiveType SwitchArchiveType
Gets or sets the SwitchArchiveType.
CommandChar string
Gets the command character. (e.g. "a", "u" or "e"...)
CompressionMethod SwitchCompressionMethod
Gets or sets the compression method.
DisableParsingOfArchiveName SwitchDisableParsingOfArchiveName
Gets or sets the SwitchDisableParsingOfArchiveName.
ExcludeArchiveFilenames SwitchExcludeArchiveFilenameCollection
Gets or sets the SwitchExcludeArchiveFilenameCollection.
ExcludeFilenames SwitchExcludeFilenameCollection
Gets or sets the SwitchExcludeFilenameCollection.
FullyQualifiedFilePaths SwitchFullyQualifiedFilePaths
Gets or sets the SwitchFullyQualifiedFilePaths.
IncludeArchiveFilenames SwitchIncludeArchiveFilenameCollection
Gets or sets the SwitchIncludeArchiveFilenameCollection.
IncludeFilenames SwitchIncludeFilenameCollection
Gets or sets the SwitchIncludeFilenameCollection.
NtfsAlternateStreams SwitchNtfsAlternateStreams
Gets or sets the SwitchNtfsAlternateStreams.
NtSecurityInformation SwitchNtSecurityInformation
Gets or sets the SwitchNtSecurityInformation.
OutputDirectory SwitchOutputDirectory
Gets or sets the SwitchOutputDirectory.
OverwriteMode SwitchOverwriteMode
Gets or sets the SwitchOverwriteMode.
Password SwitchPassword
Gets or sets the SwitchPassword.
RecurseSubdirectories SwitchRecurseSubdirectories
Gets or sets the SwitchRecurseSubdirectories.
Switches IEnumerable<ISwitch>
Gets all supported switches.
UseFullPaths bool
Gets or sets a value indicating whether to use full paths. Default is true.

Methods

Name Value Summary
BuildArgumentParams(ProcessArgumentBuilder) void
adds only the arguments to the builder. (i.e. Archive, files, directories).
BuildArguments(ProcessArgumentBuilder) void
Builds the arguments.
Inherited from BaseCommand

Extension Methods

Name Value Summary
Dump<ExtractCommand>() string
Get a basic string representation of specified object.
Requires the Cake.Incubator addin
IsIn<ExtractCommand>(ExtractCommand[]) bool
Checks if the source is contained in a list
Requires the Cake.Incubator addin
NotNull<ExtractCommand>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Ftp addin
NotNull<ExtractCommand>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Issues addin
ThrowIfNull<ExtractCommand>(string, string) T
Throws a System.ArgumentNullException with a specific message if the value is null, otherwise returns the value
Requires the Cake.Incubator addin
ThrowIfNull<ExtractCommand>(string) T
Throws a System.ArgumentNullException if the value is null, otherwise returns the value
Requires the Cake.Incubator addin
ToDictionary() IDictionary<string, object>
Requires the Cake.DeployParams addin