Add local appdata PathTool method

This commit is contained in:
Matt Nadareski
2026-07-12 09:14:57 -04:00
parent 78c6c1b6f6
commit c4b41e1f2c

View File

@@ -19,6 +19,18 @@ namespace SabreTools.IO
#endif
}
/// <summary>
/// Get the local appdata directory for the current user
/// </summary>
public static string GetLocalAppDataDirectory()
{
#if NET20 || NET35
return Environment.ExpandEnvironmentVariables("%LOCALAPPDATA%");
#else
return Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
#endif
}
/// <summary>
/// Get the runtime directory
/// </summary>