2026-02-05 11:14:01 +01:00
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using Duplicati.Library.Interface;
|
|
|
|
|
|
2026-03-05 15:30:36 +01:00
|
|
|
namespace Duplicati.Proprietary.DiskImage.General;
|
2026-02-05 11:14:01 +01:00
|
|
|
|
2026-02-15 12:45:59 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Helper class containing constants and command-line argument definitions for the DiskImage module.
|
|
|
|
|
/// </summary>
|
2026-02-05 11:14:01 +01:00
|
|
|
internal static class OptionsHelper
|
|
|
|
|
{
|
2026-02-15 12:45:59 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// The module key identifier for the DiskImage module.
|
|
|
|
|
/// </summary>
|
2026-02-05 11:14:01 +01:00
|
|
|
internal const string ModuleKey = "diskimage";
|
2026-02-15 12:45:59 +01:00
|
|
|
|
2026-02-16 10:03:10 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Option to automatically unmount the target disk before restore operations.
|
|
|
|
|
/// </summary>
|
|
|
|
|
internal const string DISK_RESTORE_AUTO_UNMOUNT_OPTION = "diskimage-restore-auto-unmount";
|
|
|
|
|
|
2026-02-15 12:45:59 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Option to skip partition table restoration during restore operations.
|
|
|
|
|
/// </summary>
|
2026-02-06 06:05:34 +01:00
|
|
|
internal const string DISK_RESTORE_SKIP_PARTITION_TABLE_OPTION = "diskimage-restore-skip-partition-table";
|
2026-02-15 12:45:59 +01:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Option to validate target disk size before restoring.
|
|
|
|
|
/// </summary>
|
2026-02-06 06:05:34 +01:00
|
|
|
internal const string DISK_RESTORE_VALIDATE_SIZE_OPTION = "diskimage-restore-validate-size";
|
2026-02-05 11:14:01 +01:00
|
|
|
|
2026-02-15 12:45:59 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the list of supported command-line arguments for the DiskImage module.
|
|
|
|
|
/// </summary>
|
2026-02-05 11:14:01 +01:00
|
|
|
internal static IList<ICommandLineArgument> SupportedCommands =>
|
|
|
|
|
[
|
2026-02-16 10:03:10 +01:00
|
|
|
new CommandLineArgument(DISK_RESTORE_AUTO_UNMOUNT_OPTION, CommandLineArgument.ArgumentType.Boolean, Strings.DiskRestoreAutoUnmountShort, Strings.DiskRestoreAutoUnmountLong, "false"),
|
2026-02-06 06:05:34 +01:00
|
|
|
new CommandLineArgument(DISK_RESTORE_SKIP_PARTITION_TABLE_OPTION, CommandLineArgument.ArgumentType.Boolean, Strings.DiskRestoreSkipPartitionTableShort, Strings.DiskRestoreSkipPartitionTableLong, "false"),
|
|
|
|
|
new CommandLineArgument(DISK_RESTORE_VALIDATE_SIZE_OPTION, CommandLineArgument.ArgumentType.Boolean, Strings.DiskRestoreValidateSizeShort, Strings.DiskRestoreValidateSizeLong, "true")
|
2026-02-05 11:14:01 +01:00
|
|
|
];
|
|
|
|
|
}
|