Page MenuHomeDevCentral

No OneTemporary

diff --git a/src/OS/CurrentOS.php b/src/OS/CurrentOS.php
index f957704..d6ba794 100644
--- a/src/OS/CurrentOS.php
+++ b/src/OS/CurrentOS.php
@@ -1,16 +1,20 @@
<?php
declare(strict_types=1);
namespace Keruald\OmniTools\OS;
class CurrentOS {
public static function isWindows () : bool {
return PHP_OS === 'CYGWIN' || self::isPureWindows();
}
public static function isPureWindows () : bool {
return strtoupper(substr(PHP_OS, 0, 3)) === 'WIN';
}
+ public static function isBSD () : bool {
+ return substr(PHP_OS, -3) === "BSD" || PHP_OS === "DragonFly";
+ }
+
}

File Metadata

Mime Type
text/x-diff
Expires
Mon, Nov 25, 11:00 (1 d, 17 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2260041
Default Alt Text
(624 B)

Event Timeline