MkswapCommand.Builder

Fluent builder.

public class MkswapCommand.Builder :
    LinuxCommandBase.BuilderBase<MkswapCommand, MkswapCommand.Builder>

1. Constructors

1.1. Builder()

Creates a new builder pointed at /usr/sbin/mkswap.

public Builder()

2. Methods

2.1. BuildInternal(CliWrap.Command)

protected override MkswapCommand BuildInternal(CliWrap.Command cliCommand)
Table 1. Parameters
Name Type Description

cliCommand

CliWrap.Command

Returns: MkswapCommand

2.2. EnableForce()

Force initialization even if the device already contains a signature (-f). Required when re-purposing a disk that previously held a filesystem.

public MkswapCommand.Builder EnableForce()

Returns: MkswapCommand.Builder

2.3. WithDevice(string)

Block device or file to format as swap (positional).

public MkswapCommand.Builder WithDevice(string device)
Table 2. Parameters
Name Type Description

device

string

Returns: MkswapCommand.Builder

2.4. WithLabel(string)

Specify a label for the swap area (-L <label>).

public MkswapCommand.Builder WithLabel(string label)
Table 3. Parameters
Name Type Description

label

string

Returns: MkswapCommand.Builder

2.5. WithUuid(string)

Specify a UUID for the swap area (-U <uuid>).

public MkswapCommand.Builder WithUuid(string uuid)
Table 4. Parameters
Name Type Description

uuid

string

Returns: MkswapCommand.Builder