SevenZipCommand.Builder
public class SevenZipCommand.Builder :
CliWrapCommandBase<CommandResult>.BuilderBase<SevenZipCommand, SevenZipCommand.Builder>
1. Constructors
1.1. Builder(AbsolutePath)
Test constructor — allows passing an explicit executable path (used in unit tests to avoid OS probing).
public Builder(AbsolutePath executablePath)
| Name | Type | Description |
|---|---|---|
executablePath |
AbsolutePath |
1.2. Builder(ISystemHost)
public Builder(ISystemHost host)
| Name | Type | Description |
|---|---|---|
host |
ISystemHost |
2. Properties
2.1. ArgumentSuffix
protected override string ArgumentSuffix { get; }
2.2. LongArgumentPrefix
protected override string LongArgumentPrefix { get; }
2.3. SingleCharacterArgumentPrefix
protected override string SingleCharacterArgumentPrefix { get; }
3. Methods
3.1. BuildInternal(CliWrap.Command)
protected override SevenZipCommand BuildInternal(CliWrap.Command cliCommand)
| Name | Type | Description |
|---|---|---|
cliCommand |
CliWrap.Command |
Returns: SevenZipCommand
3.2. ExtractTo(AbsolutePath, AbsolutePath, bool)
Extract archive. Produces: x -y -o"{targetDir}" "{archive}". Quoting handles paths with spaces.
public SevenZipCommand.Builder ExtractTo(AbsolutePath archive, AbsolutePath targetDir, bool overwrite = true)
| Name | Type | Description |
|---|---|---|
archive |
AbsolutePath |
|
targetDir |
AbsolutePath |
|
overwrite |
bool |
Returns: SevenZipCommand.Builder
3.3. TestArchive(AbsolutePath)
Test archive integrity. Produces: t "{archive}".
public SevenZipCommand.Builder TestArchive(AbsolutePath archive)
| Name | Type | Description |
|---|---|---|
archive |
AbsolutePath |
Returns: SevenZipCommand.Builder