Files
duplicati/proprietary/DiskImage/General/OptionsHelper.cs
T

41 lines
1.8 KiB
C#
Raw Normal View History

using System.Collections.Generic;
using Duplicati.Library.Interface;
namespace Duplicati.Proprietary.DiskImage.General;
2026-02-15 12:45:59 +01:00
/// <summary>
/// Helper class containing constants and command-line argument definitions for the DiskImage module.
/// </summary>
internal static class OptionsHelper
{
2026-02-15 12:45:59 +01:00
/// <summary>
/// The module key identifier for the DiskImage module.
/// </summary>
internal const string ModuleKey = "diskimage";
2026-02-15 12:45:59 +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-15 12:45:59 +01:00
/// <summary>
/// Gets the list of supported command-line arguments for the DiskImage module.
/// </summary>
internal static IList<ICommandLineArgument> SupportedCommands =>
[
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")
];
}