Changeset 10169


Ignore:
Timestamp:
2005-06-24T13:17:50+12:00 (19 years ago)
Author:
kjdon
Message:

added isMac()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl3/src/java/org/greenstone/gsdl3/util/Misc.java

    r9874 r10169  
    4646    }
    4747   
     48    /** Method to determine if the host system is Windows based.
     49     * @return a boolean which is true if the platform is Windows,
     50     * false otherwise
     51     */
    4852    public static boolean isWindows() {
    4953    Properties props = System.getProperties();
     
    5357    }
    5458    return false;
     59    }
     60   
     61    /** Method to determine if the host system is MacOS based.
     62     * @return a boolean which is true if the platform is MacOS, false otherwise
     63     */
     64    public static boolean isMac() {
     65        Properties props = System.getProperties();
     66        String os_name = props.getProperty("os.name","");
     67        if(os_name.startsWith("Mac OS")) {
     68            return true;
     69        }
     70        return false;
    5571    }
    5672
Note: See TracChangeset for help on using the changeset viewer.