From 71f2bc737d96fcd29fcf2e5f494c6ae259d7b64e Mon Sep 17 00:00:00 2001 From: Shadow53 Date: Sat, 30 Jan 2016 15:52:30 -0800 Subject: Added Properties.isLinux to compliment the isWin and isMac methods --- src/library/scala/util/Properties.scala | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/library/scala/util/Properties.scala b/src/library/scala/util/Properties.scala index d4a5e2f0e8..6ee74acd6a 100644 --- a/src/library/scala/util/Properties.scala +++ b/src/library/scala/util/Properties.scala @@ -148,6 +148,8 @@ private[scala] trait PropertiesTrait { // the reason why we don't follow developer.apple.com/library/mac/#technotes/tn2002/tn2110. /** Returns `true` iff the underlying operating system is a version of Apple Mac OSX. */ def isMac = osName startsWith "Mac OS X" + /** Returns `true` iff the underlying operating system is a Linux distribution. */ + def isLinux = osName startsWith "Linux" /* Some runtime values. */ private[scala] def isAvian = javaVmName contains "Avian" -- cgit v1.2.3