-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
27 lines (24 loc) · 914 Bytes
/
Program.cs
File metadata and controls
27 lines (24 loc) · 914 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// Password Manager Console App
// High-quality, SOLID-oriented single-file implementation
// .NET 6+ compatible. Build with: dotnet new console -n PasswordManager && replace Program.cs, then `dotnet run`
namespace kvault
{
#region Program Entry
public static class Program
{
/// <summary>
/// Entry point: ensures data directory exists, resolves paths, and starts the app.
/// </summary>
public static void Main(string[] args)
{
var exeDir = AppContext.BaseDirectory;
var dataDir = Path.Combine(exeDir, "data");
Directory.CreateDirectory(dataDir);
var vaultPath = args.Length > 0 ? args[0] : Path.Combine(dataDir, "vault.json");
var configPath = Path.Combine(dataDir, "config.json");
var app = new App(vaultPath, configPath);
app.Run();
}
}
#endregion
}