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 "/Cake.7zip/api/Cake.SevenZip.Commands/BaseCommand" Base0-->Base1["object"] Type-.->Interface0["ICommand"] click Interface0 "/Cake.7zip/api/Cake.SevenZip.Commands/ICommand" Type-.->Interface1["IHaveArgumentArchive"] click Interface1 "/Cake.7zip/api/Cake.SevenZip.Arguments/IHaveArgumentArchive" Type-.->Interface2["IHaveArgument"] click Interface2 "/Cake.7zip/api/Cake.SevenZip.Arguments/IHaveArgument" Type-.->Interface3["ISupportSwitchIncludeFilenames"] click Interface3 "/Cake.7zip/api/Cake.SevenZip.Switches/ISupportSwitchIncludeFilenames" Type-.->Interface4["ISupportSwitchCompressionMethod"] click Interface4 "/Cake.7zip/api/Cake.SevenZip.Switches/ISupportSwitchCompressionMethod" Type-.->Interface5["ISupportSwitchPassword"] click Interface5 "/Cake.7zip/api/Cake.SevenZip.Switches/ISupportSwitchPassword" Type-.->Interface6["ISupportSwitchRecurseSubdirectories"] click Interface6 "/Cake.7zip/api/Cake.SevenZip.Switches/ISupportSwitchRecurseSubdirectories" Type-.->Interface7["ISupportSwitchNtSecurityInformation"] click Interface7 "/Cake.7zip/api/Cake.SevenZip.Switches/ISupportSwitchNtSecurityInformation" Type-.->Interface8["ISupportSwitchNtfsAlternateStreams"] click Interface8 "/Cake.7zip/api/Cake.SevenZip.Switches/ISupportSwitchNtfsAlternateStreams" Type-.->Interface9["ISupportSwitchExcludeFilenames"] click Interface9 "/Cake.7zip/api/Cake.SevenZip.Switches/ISupportSwitchExcludeFilenames" Type-.->Interface10["ISupportSwitchArchiveType"] click Interface10 "/Cake.7zip/api/Cake.SevenZip.Switches/ISupportSwitchArchiveType" Type-.->Interface11["ISupportSwitchIncludeArchiveFilenames"] click Interface11 "/Cake.7zip/api/Cake.SevenZip.Switches/ISupportSwitchIncludeArchiveFilenames" Type-.->Interface12["ISupportSwitchExcludeArchiveFilenames"] click Interface12 "/Cake.7zip/api/Cake.SevenZip.Switches/ISupportSwitchExcludeArchiveFilenames" Type-.->Interface13["ISupportSwitchDisableParsingOfArchiveName"] click Interface13 "/Cake.7zip/api/Cake.SevenZip.Switches/ISupportSwitchDisableParsingOfArchiveName" Type-.->Interface14["ISupportSwitchOverwriteMode"] click Interface14 "/Cake.7zip/api/Cake.SevenZip.Switches/ISupportSwitchOverwriteMode" Type-.->Interface15["ISupportSwitchOutputDirectory"] click Interface15 "/Cake.7zip/api/Cake.SevenZip.Switches/ISupportSwitchOutputDirectory" Type-.->Interface16["ISupportSwitchFullyQualifiedFilePaths"] click Interface16 "/Cake.7zip/api/Cake.SevenZip.Switches/ISupportSwitchFullyQualifiedFilePaths" Type-.->Interface17["ISupportSwitch"] click Interface17 "/Cake.7zip/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

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.
NtSecurityInformation SwitchNtSecurityInformation?
Gets or sets the SwitchNtSecurityInformation.
NtfsAlternateStreams SwitchNtfsAlternateStreams?
Gets or sets the SwitchNtfsAlternateStreams.
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
GitHub Discussion