Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3768856
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
624 B
Referenced Files
None
Subscribers
None
View Options
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
Details
Attached
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)
Attached To
Mode
rKOT Keruald OmniTools
Attached
Detach File
Event Timeline
Log In to Comment