Cake.SevenZip.Switches Namespace

Summary

This namespace contain types related to running 7zip.

Class Types

Class Summary
BaseBoolSwitch BaseClass for simple boolean switches.
BaseSwitchCollection<T> Base for switches that can be given multiple times. An example is ISupportSwitchExcludeFilenames (-x!*.pdf -x!*.xml) which uses SwitchExcludeFilenameCollection (which implements this BaseCollection) to set multiple SwitchExcludeFilename.
OverwriteMode

Specifies the overwrite mode during extraction, to overwrite files already present on disk.

RecurseType

Specifies the method of treating wildcards and filenames on the command line.

SwitchArchiveType

-t (set Type of archive) switch.

Specifies the type of archive.

SwitchCompressFilesOpenForWriting

-ssw (Compress files open for writing) switch.

Compresses files open for writing by another applications. If this switch is not set, 7-zip doesn't include such files to archive.

SwitchCompressionMethod

-m (Set compression Method) switch.

Specifies the compression method.

SwitchDeleteAfterCompression

-sdel (Delete files after compression) switch.

If -sdel switch is specified, 7-Zip deletes files after including to archive. So it works like moving files to archive. 7-Zip deletes files at the end of operation and only if archive was successfully created.

SwitchDisableParsingOfArchiveName

-an (Disable parsing of archive_name) switch.

Disables parsing of the archive_name field on the command line. This switch must be used with the -ai (Include archives) switch. If you use a file list for your archives, you specify it with the -ai switch, so you need to disable parsing of archive_name field from command line.

SwitchExcludeArchiveFilename

-ax (Exclude archive filenames) switch.

Specifies archives to be excluded from the operation. Multiple exclude archive switches are supported.

SwitchExcludeArchiveFilenameCollection A Collection of SwitchExcludeArchiveFilename.
SwitchExcludeFilename

-x (Exclude filenames) switch.

Specifies which filenames or wildcard-names must be excluded from the operation. Multiple exclude switches are supported.

SwitchExcludeFilenameCollection A Collection of SwitchExcludeFilename.
SwitchFullyQualifiedFilePaths -spf (Use fully qualified file paths) switch. (Also, -spf2 for full paths without drive letters.)

Enables the mode that allows to use fully qualified file paths in archives. If -spf switch is not specified, 7-Zip reduces file paths to relative paths when it adds files to archive, and 7-Zip converts paths to relative paths when you extract archive. If -spf switch is specified, 7-Zip doesn't try to process or convert paths.

SwitchIncludeArchiveFilename

-ai (Include archive filenames) switch.

Specifies additional include archive filenames and wildcards. Multiple include switches are supported.

SwitchIncludeArchiveFilenameCollection A Collection of SwitchIncludeArchiveFilename.
SwitchIncludeFilename

-i (Include filenames) switch.

Specifies additional include filenames and wildcards. Multiple include switches are supported.

SwitchIncludeFilenameCollection A Collection of SwitchIncludeFilename.
SwitchNtfsAlternateStreams

-sns (Store NTFS alternate Streams) switch.

If -sns mode is enabled, 7-Zip processes NTFS Alternate Data Streams for files and folders. Current version of 7-Zip can store NTFS alternate streams only to WIM archives. Note: 7-Zip can't include alternate streams to archives on 32-bit Windows XP and older systems.

SwitchNtSecurityInformation

-sni (Store NT security information) switch.

Use this switch to store and restore NT (NTFS) security information for files and directories. Note that only NTFS file system supports that feature. Current version of 7-Zip can store NT security information only to WIM archives.

SwitchOutputDirectory

-o (set Output directory) switch.

Specifies a destination directory where files are to be extracted. This switch can be used only with extraction commands.

SwitchOverwriteMode

-ao (Overwrite mode) switch.

Specifies the overwrite mode during extraction, to overwrite files already present on disk.

SwitchPassword

-p (set Password) switch.

Specifies password.

SwitchRecurseSubdirectories

-r (Recurse subdirectories) switch.

Specifies the method of treating wildcards and filenames on the command line.

SwitchSelfExtractingArchive

-sfx (Create SFX archive) switch.

Specifies the SFX module that will be combined with the archive. This module must be placed in the same directory as the 7z.exe. If {SFX_Module} is not assigned, 7-Zip will use standard console SFX module 7zCon.sfx.

SwitchSetHashFunction

-scrc (Set hash function) switch.

Sets hash function for "extract" and "hash" commands.

SwitchSetHashFunctionCollection A Collection of SwitchSetHashFunction.
SwitchSetTimestampFromMostRecentFile

-stl (Set archive time-stamp from the most recently modified file) switch.

If -stl switch is specified, 7-Zip sets time-stamp for archive file as time-stamp from the most recently modified file in that archive.

SwitchShowTechnicalInformation

-slt (Show technical information) switch.

Sets technical mode for l (List) command.

SwitchUpdateOptions

-u (Update options) switch.

Specifies how to update files in an archive and (or) how to create new archives.

SwitchVolume

-v (Create Volumes) switch.

Specifies volume sizes.

SwitchVolumeCollection A Collection of SwitchVolume.
SwitchWorkingDirectory

-w (set Working directory) switch.

Sets the working directory for the temporary base archive. By default, 7-Zip builds a new base archive file in the same directory as the old base archive file. By specifying this switch, you can set the working directory where the temporary base archive file will be built. After the temporary base archive file is built, it is copied over the original archive; then, the temporary file is deleted.

UpdateAction Specifies the action for a given SwitchUpdateOptions-State.

VolumeUnit Units for SwitchCompressionMethod.

Interface Types

Interface Summary
ISupportSwitch Interfaces for all switches. Commands "support" switches by implementing an ISupportSwitch (e.g. ISupportSwitchPassword is implemented in all commands that support setting a password (-p).
ISupportSwitchArchiveType

Command supports switch -t (set Type of archive).

The Switch is SwitchArchiveType.

The Builder is SwitchArchiveTypeBuilder.

ISupportSwitchCompressFilesOpenForWriting

Command supports switch -ssw (Compress files open for writing).

The Switch is SwitchCompressFilesOpenForWriting.

The Builder is SwitchCompressFilesOpenForWritingBuilder.

ISupportSwitchCompressionMethod

Command supports switch -m (Set compression Method).

The Switch is SwitchCompressionMethod.

The Builder is SwitchCompressionMethodBuilder.

ISupportSwitchDeleteAfterCompression

Command supports switch -sdel (Delete files after compression).

The Switch is SwitchDeleteAfterCompression.

The Builder is SwitchDeleteAfterCompressionBuilder.

ISupportSwitchDisableParsingOfArchiveName

Command supports switch -an (Disable parsing of archive_name).

The Switch is SwitchDisableParsingOfArchiveName.

The Builder is SwitchDisableParsingOfArchiveNameBuilder.

ISupportSwitchExcludeArchiveFilenames

Command supports switch -ax (Exclude archive filenames).

The Switch is SwitchExcludeArchiveFilenameCollection.

The Builder is SwitchExcludeArchiveFilenamesBuilder.

ISupportSwitchExcludeFilenames

Command supports switch -x (Exclude filenames).

The Switch is SwitchExcludeFilenameCollection.

The Builder is SwitchExcludeFilenamesBuilder.

ISupportSwitchFullyQualifiedFilePaths

Command supports switch -spf/-spf2 (Use fully qualified file paths).

The Switch is SwitchFullyQualifiedFilePaths.

The Builder is SwitchFullyQualifiedFilePathsBuilder.

ISupportSwitchIncludeArchiveFilenames

Command supports switch -ai (Include archive filenames).

The Switch is SwitchIncludeArchiveFilenameCollection.

The Builder is SwitchIncludeArchiveFilenamesBuilder.

ISupportSwitchIncludeFilenames

Command supports switch -i (Include filenames).

The Switch is SwitchIncludeFilenameCollection.

The Builder is SwitchIncludeFilenamesBuilder.

ISupportSwitchNtfsAlternateStreams

Command supports switch -sns (NTFS alternate Streams).

The Switch is SwitchNtfsAlternateStreams.

The Builder is SwitchNtfsAlternateStreamsBuilder.

ISupportSwitchNtSecurityInformation

Command supports switch -sni (NT security information).

The Switch is SwitchNtSecurityInformation.

The Builder is SwitchNtSecurityInformationBuilder.

ISupportSwitchOutputDirectory

Command supports switch -o (set Output directory).

The Switch is SwitchOutputDirectory.

The Builder is SwitchOutputDirectoryBuilder.

ISupportSwitchOverwriteMode

Command supports switch -ao (Overwrite mode).

The Switch is SwitchOverwriteMode.

The Builder is SwitchOverwriteModeBuilder.

ISupportSwitchPassword

Command supports switch -p (set Password) .

The Switch is SwitchPassword.

The Builder is SwitchPasswordBuilder.

ISupportSwitchRecurseSubdirectories

Command supports switch -r (Recurse subdirectories).

The Switch is SwitchRecurseSubdirectories.

The Builder is SwitchRecurseSubdirectoriesBuilder.

ISupportSwitchSelfExtractingArchive

Command supports switch -sfx (Create SFX archive).

The Switch is SwitchSelfExtractingArchive.

The Builder is SwitchSelfExtractingArchiveBuilder.

ISupportSwitchSetHashFunction

Command supports switch -scrc (Set hash function).

The Switch is SwitchSetHashFunction.

The Builder is SwitchSetHashFunctionBuilder.

ISupportSwitchShowTechnicalInformation

Command supports switch -slt (Show technical information).

The Switch is SwitchShowTechnicalInformation.

The Builder is SwitchShowTechnicalInformationBuilder.

ISupportSwitchTimestampFromMostRecentFile

Command supports switch -stl (Set archive time-stamp from the most recently modified file).

The Switch is SwitchSetTimestampFromMostRecentFile.

The Builder is SwitchSetTimestampFromMostRecentFileBuilder.

ISupportSwitchUpdateOptions

Command supports switch -u (Update options).

The Switch is SwitchUpdateOptions.

The Builder is SwitchUpdateOptionsBuilder.

ISupportSwitchVolume

Command supports switch -v (Create Volumes).

The Switch is SwitchVolumeCollection.

The Builder is SwitchVolumeBuilder.

ISupportSwitchWorkingDirectory .

Command supports switch -w (Working directory).

The Switch is SwitchWorkingDirectory.

The Builder is SwitchWorkingDirectoryBuilder.

ISwitch Base for all Switches.