Windows storage spaces (#871)

This commit is contained in:
marcadamsge
2022-11-10 18:33:44 +01:00
committed by GitHub
parent f9cfde5f91
commit f2b93c09b0
2 changed files with 81 additions and 2 deletions
@@ -20,10 +20,13 @@ public static class OperatingSystem
{
// The operating system doesn't change during execution so let's query it just one time.
PlatformID platform = Environment.OSVersion.Platform;
Version version = Environment.OSVersion.Version;
IsUnix = platform is PlatformID.Unix or PlatformID.MacOSX;
if (Environment.Is64BitOperatingSystem)
Is64Bit = true;
IsWindows8OrGreater = !IsUnix && ((version.Major == 6 && version.Minor >= 2) || version.Major > 6);
}
/// <summary>
@@ -35,4 +38,9 @@ public static class OperatingSystem
/// Gets information about whether the current system is Unix based.
/// </summary>
public static bool IsUnix { get; }
}
/// <summary>
/// Returns true if the current system is Windows 8 or a more recent Windows version
/// </summary>
public static bool IsWindows8OrGreater { get; }
}