From 4d3e88b9f54e893a6de49724538cd73c9dc6ea5f Mon Sep 17 00:00:00 2001 From: Jake Mannens Date: Wed, 29 Apr 2026 23:26:18 +1000 Subject: v0.13a --- Util.cs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 Util.cs (limited to 'Util.cs') diff --git a/Util.cs b/Util.cs new file mode 100644 index 0000000..53c82e4 --- /dev/null +++ b/Util.cs @@ -0,0 +1,19 @@ +using HyperBooru.ApiModels; +using System.Runtime.InteropServices; + +namespace HyperBooru.ApiClient; + +internal static class Util { + internal static PathType CurrentOSPathType { + get { + KeyValuePair[] 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; + } + } +} -- cgit v1.3