s2pk/Config.cs
Tony Bark b23431cdb2 Fallback to config for destination directory
- Install script
- Rewrote Why This Exists section
- Method documentation comments
2025-04-30 08:46:02 -04:00

18 lines
495 B
C#

namespace S2PK;
public class Config
{
public string Destination { get; set; } = string.Empty;
/// <summary>
/// Loads the configuration from the specified file path.
/// </summary>
/// <param name="path">The path to the configuration file.</param>
/// <returns>The loaded configuration.</returns>
public static Config Load(string path)
{
var file = File.ReadAllText(path);
var config = Toml.ToModel<Config>(file);
return config;
}
}