Made unreal work and make the fake drive update with the json so you can edit the fake config and it writes to the real drive.

This commit is contained in:
2026-01-07 09:16:57 +11:00
parent 9070768fe7
commit dafeeb0f15
9 changed files with 919 additions and 1387 deletions

57
DevDriveConfig.cs Normal file
View File

@@ -0,0 +1,57 @@
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;
}