diff options
| author | Jake Mannens <jake@asger.xyz> | 2026-04-29 23:26:18 +1000 |
|---|---|---|
| committer | Jake Mannens <jake@asger.xyz> | 2026-05-06 04:24:37 +1000 |
| commit | 4d3e88b9f54e893a6de49724538cd73c9dc6ea5f (patch) | |
| tree | 624575e4d948f7a01f16fa8680e346ba1716ae05 /Util.cs | |
v0.13av0.13a
Diffstat (limited to 'Util.cs')
| -rw-r--r-- | Util.cs | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -0,0 +1,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; + } + } +} |
