mirror of
https://github.com/SabreTools/SabreTools.IO.git
synced 2026-11-15 16:41:58 +00:00
Add GetAppDataDirectory due to OSX need
This commit is contained in:
@@ -7,6 +7,18 @@ namespace SabreTools.IO
|
||||
/// </summary>
|
||||
public static class PathTool
|
||||
{
|
||||
/// <summary>
|
||||
/// Get the appdata directory
|
||||
/// </summary>
|
||||
public static string GetAppDataDirectory()
|
||||
{
|
||||
#if NET20 || NET35
|
||||
return Environment.ExpandEnvironmentVariables("%APPDATA%");
|
||||
#else
|
||||
return Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the home directory for the current user
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user