Files
DevDrive/DevDriveConfig.cs

58 lines
1.5 KiB
C#

using System.Text.Json.Serialization;
namespace DevDrive;
/// <summary>
/// Represents the index.json configuration file structure.
/// </summary>
public class DevDriveConfig
{
/// <summary>
/// Display name for the drive.
/// </summary>
[JsonPropertyName("driveName")]
public string DriveName { get; set; } = "Dev Drive";
/// <summary>
/// Icon path in format "path,index" (e.g. "%SystemRoot%\System32\shell32.dll,8").
/// </summary>
[JsonPropertyName("driveIcon")]
public string DriveIcon { get; set; } = "";
/// <summary>
/// Total drive capacity in MB (for display purposes).
/// </summary>
[JsonPropertyName("driveTotalMB")]
public double DriveTotalMB { get; set; } = 1.44;
/// <summary>
/// Free space in MB (for display purposes).
/// </summary>
[JsonPropertyName("driveFreeMB")]
public double DriveFreeMB { get; set; } = 0.72;
/// <summary>
/// List of symlink entries to create in the drive root.
/// </summary>
[JsonPropertyName("paths")]
public List<SymlinkEntry> Paths { get; set; } = [];
}
/// <summary>
/// Represents a single symlink entry.
/// </summary>
public class SymlinkEntry
{
/// <summary>
/// Name of the symlink (folder/file name in the drive).
/// </summary>
[JsonPropertyName("name")]
public string Name { get; set; } = string.Empty;
/// <summary>
/// Target path the symlink points to.
/// </summary>
[JsonPropertyName("path")]
public string Path { get; set; } = string.Empty;
}