1
0
Fork 0
mirror of https://github.com/hawkeye-stan/msfs-popout-panel-manager.git synced 2024-11-24 14:50:10 +00:00
msfs-popout-panel-manager/Shared/FileIO.cs

53 lines
2.3 KiB
C#
Raw Normal View History

2022-07-23 19:23:32 +00:00
using System;
using System.IO;
2022-01-27 13:40:04 +00:00
namespace MSFSPopoutPanelManager.Shared
{
public class FileIo
{
public static string GetUserDataFilePath()
{
2023-07-12 22:41:31 +00:00
#if DEBUG
2022-07-23 19:23:32 +00:00
return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "MSFS Pop Out Panel Manager Debug");
2023-07-12 22:41:31 +00:00
#elif LOCAL
return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "MSFS Pop Out Panel Manager Local");
2022-07-23 19:23:32 +00:00
#else
return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "MSFS Pop Out Panel Manager");
#endif
}
public static string GetErrorLogFilePath()
{
2023-07-12 22:41:31 +00:00
#if DEBUG
2022-07-23 19:23:32 +00:00
return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), @"MSFS Pop Out Panel Manager Debug\LogFiles\error.log");
2023-07-12 22:41:31 +00:00
#elif LOCAL
return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), @"MSFS Pop Out Panel Manager Local\LogFiles\error.log");
2022-07-23 19:23:32 +00:00
#else
return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), @"MSFS Pop Out Panel Manager\LogFiles\error.log");
#endif
}
public static string GetDebugLogFilePath()
{
2023-07-12 22:41:31 +00:00
#if DEBUG
2022-07-23 19:23:32 +00:00
return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), @"MSFS Pop Out Panel Manager Debug\LogFiles\debug.log");
2023-07-12 22:41:31 +00:00
#elif LOCAL
return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), @"MSFS Pop Out Panel Manager Local\LogFiles\debug.log");
2022-07-23 19:23:32 +00:00
#else
return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), @"MSFS Pop Out Panel Manager\LogFiles\debug.log");
#endif
}
public static string GetInfoLogFilePath()
{
2023-07-12 22:41:31 +00:00
#if DEBUG
2022-07-23 19:23:32 +00:00
return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), @"MSFS Pop Out Panel Manager Debug\LogFiles\info.log");
2023-07-12 22:41:31 +00:00
#elif LOCAL
return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), @"MSFS Pop Out Panel Manager Local\LogFiles\info.log");
2022-07-23 19:23:32 +00:00
#else
return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), @"MSFS Pop Out Panel Manager\LogFiles\info.log");
#endif
2022-01-27 13:40:04 +00:00
}
}
}