blob: 53c82e49c38f5ef3e9ff8d9c17ac5e37edf175b0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
using HyperBooru.ApiModels;
using System.Runtime.InteropServices;
namespace HyperBooru.ApiClient;
internal static class Util {
internal static PathType CurrentOSPathType {
get {
KeyValuePair<OSPlatform, PathType>[] osPlatformMap = [
new(OSPlatform.Windows, PathType.Windows),
new(OSPlatform.OSX, PathType.Unix),
new(OSPlatform.Linux, PathType.Unix),
new(OSPlatform.FreeBSD, PathType.Unix),
];
return osPlatformMap.First(kv => RuntimeInformation.IsOSPlatform(kv.Key)).Value;
}
}
}
|