code: public static boolean isMacOs() {
          String osName = System.getProperty("os.name");
          return osName == null ? false : osName.toLowerCase().startsWith("mac");
      }
docs: Checks if the running OS is a MacOS/MacOS X.
  @return true if MacOS (or MacOS X), false otherwise