mirror of
https://github.com/SabreTools/SabreTools.IO.git
synced 2026-09-22 14:45:58 +00:00
Add local appdata PathTool method
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user