Public Access
18 lines
540 B
C#
18 lines
540 B
C#
namespace MeetingAssistant;
|
|
|
|
public static class VaultPath
|
|
{
|
|
public static string Resolve(string path)
|
|
{
|
|
var expanded = Environment.ExpandEnvironmentVariables(path);
|
|
if (expanded.StartsWith("~", StringComparison.Ordinal))
|
|
{
|
|
expanded = Path.Combine(
|
|
Environment.GetFolderPath(Environment.SpecialFolder.UserProfile),
|
|
expanded[1..].TrimStart(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar));
|
|
}
|
|
|
|
return Path.GetFullPath(expanded);
|
|
}
|
|
}
|