Gets operating system family.

@return os family, may be null.
199941
public OSFamilyEnum getOsfamily() {
    if (isReference()) {
      final TargetDef refPlatform = (TargetDef) getCheckedRef(TargetDef.class, "TargetDef");
      return refPlatform.getOsfamily();
    }
    return this.osFamily;
  }
301210
private OsType determineOsType(String imageId) {
        InspectImageResponse ir = getClient().inspectImageCmd(imageId).exec();
        if ("linux".equalsIgnoreCase(ir.getOs())) {
            LOG.trace("Detected LINUX operating system for image: {}", imageId);
            return OsType.LINUX;
        } else if ("windows".equalsIgnoreCase(ir.getOs())) {
            LOG.trace("Detected WINDOWS operating system for image: {}", imageId);
            return OsType.WINDOWS;
        } else {
            LOG.trace("Detected OTHER operating system ({}) for image: {}", ir.getOs(), imageId);
            return OsType.OTHER;
        }
    }
1033869
public function getOperatingSystemVersion()
    {
        $os = $this->getOperatingSystem();

        return $this->prepareVersion([$os->major, $os->minor, $os->patch]);
    }
1277637
public function getOperatingSystem()
    {
        foreach ($this::$operatingSystems as $os => $UA) {
            $is_os = 'is'.$os;
            if ($this->$is_os()) {
                return $os;
            }
        }
        return '';
    }
1277430
public static VersionNumber parseOperatingSystemVersion(@Nonnull final OperatingSystemFamily family, @Nonnull final String userAgent) {
		Check.notNull(family, "family");
		Check.notNull(userAgent, "userAgent");

		final VersionNumber v;
		if (OperatingSystemFamily.ANDROID == family) {
			v = identifyAndroidVersion(userAgent);
		} else if (OperatingSystemFamily.BADA == family) {
			v = identifyBadaVersion(userAgent);
		} else if (OperatingSystemFamily.BSD == family) {
			v = identifyBSDVersion(userAgent);
		} else if (OperatingSystemFamily.IOS == family) {
			v = identifyIOSVersion(userAgent);
		} else if (OperatingSystemFamily.JVM == family) {
			v = identifyJavaVersion(userAgent);
		} else if (OperatingSystemFamily.OS_X == family) {
			v = identifyOSXVersion(userAgent);
		} else if (OperatingSystemFamily.SYMBIAN == family) {
			v = identifySymbianVersion(userAgent);
		} else if (OperatingSystemFamily.WEBOS == family) {
			v = identifyWebOSVersion(userAgent);
		} else if (OperatingSystemFamily.WINDOWS == family) {
			v = identifyWindowsVersion(userAgent);
		} else {
			v = VersionNumber.UNKNOWN;
		}
		return v;
	}
755910
public static String getSystemInformation() {
        String ret = System.getProperty("java.vendor");
        ret += " " + System.getProperty("java.version");
        ret += " on " + System.getProperty("os.name");
        ret += " " + System.getProperty("os.version");
        return ret;
    }
438523
def operating_system():
    
    if platform.system() == 'Darwin':
        return 'OS X Version %s' % platform.mac_ver()[0]
    distribution = ' '.join(platform.linux_distribution()).strip()
    os_platform = platform.platform(True, True)
    if distribution:
        os_platform += ' (%s)' % distribution
    return os_platform
598673
public String[] getFamily() {
        String[] valueDestination = new String[ family.size() ];
        this.family.getValue(valueDestination);
        return valueDestination;
    }
1217999
function () {
            if (this._cache.os === undefined) {
                this._cache.os = impl.detectOS(this.ua);
            }
            return this._cache.os;
        }
1196102
protected static String getKernelVersion() {
        String errorMsg = "Exception while attempting to read kernel information";
        String defaultVersion = System.getProperty("os.version");

        BufferedReader br = null;
        try {
            File file = new File("/proc/version");
            if (!file.canRead()) {
                return defaultVersion;
            }

            br = new BufferedReader(new FileReader(file));
            return br.readLine();
        } catch (Exception e) {
            Log.e(TAG, errorMsg, e);
        } finally {
            if (br != null) {
                try {
                    br.close();
                } catch (IOException ioe) {
                    Log.e(TAG, errorMsg, ioe);
                }
            }
        }

        return defaultVersion;
    }
801811
public static function families()
    {
        if (! isset(static::$languages)) {
            static::$languages = json_decode(static::getFile(__DIR__.'/../resources/languages.json'), true);
        }

        return static::pluck(static::$languages, 'family.name', 'family.iso_639_5');
    }
470280
public static <T extends SubSystem> T
  getCurrentSystem(Class<T> systemClass)
  {
    SystemManager manager = getCurrent();

    if (manager != null)
      return manager.getSystem(systemClass);
    else
      return null;
  }
311603
public function operatingSystem()
    {
        $UserAgent = self::agent();
        if (preg_match_all('/windows/i', $UserAgent)) {
            $PlatForm = 'Windows';
        } elseif (preg_match_all('/linux/i', $UserAgent)) {
            $PlatForm = 'Linux';
        } elseif (preg_match('/macintosh|mac os x/i', $UserAgent)) {
            $PlatForm = 'Macintosh';
        } elseif (preg_match_all('/Android/i', $UserAgent)) {
            $PlatForm = 'Android';
        } elseif (preg_match_all('/iPhone/i', $UserAgent)) {
            $PlatForm = 'IOS';
        } elseif (preg_match_all('/ubuntu/i', $UserAgent)) {
            $PlatForm = 'Ubuntu';
        } else {
            $PlatForm = 'unknown';
        }

        return $PlatForm;
    }
1095762
public static OSUtils getOSUtils() {
        switch (getCurrentOS()) {
            case OS_LINUX:
                return LinuxUtils.instance();
            case OS_MACOSX:
                return MacOSUtils.instance();
            case OS_SOLARIS:
                return SolarisUtils.instance();
            case OS_WINDOWS:
                return WindowsUtils.instance();
            default:
                throw new UnsupportedOperationException("Operating system is not implemented and supported yet.");
        }
    }
71531
public static String getMacOsMajorVersion() {
        if (!isMacOs()) {
            return null;
        }

        String osVersion = System.getProperty("os.version");

        if (osVersion != null) {
            String[] split = osVersion.split("\\.");
            if (split.length >= 2) {
                return split[0] + "." + split[1];
            } else {
                return osVersion;
            }
        }

        return null;
    }
777986
public java.lang.String getSystem() {
        return (java.lang.String) getStateHelper().eval(PropertyKeys.system);

    }
158244
def defaultSystem():
    
    rsystem = platform.system()

    # Try to lookup the string in the canon tables
    if rsystem in os_canon:
        rsystem = os_canon[rsystem][0]

    return rsystem