Changeset 6258


Ignore:
Timestamp:
2003-12-12T17:56:56+13:00 (20 years ago)
Author:
jmt12
Message:

Added a new method isMac()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/util/Utility.java

    r5916 r6258  
    683683    }
    684684
     685    /** Method to determine if the host system is MacOS based.
     686     * @return a boolean which is true if the platform is MacOS, false otherwise
     687     */
     688    public static boolean isMac() {
     689    Properties props = System.getProperties();
     690    String os_name = props.getProperty("os.name","");
     691    if(os_name.startsWith("Mac OS")) {
     692        return true;
     693    }
     694    return false;
     695    }
     696
    685697   /** Determines if the given file is a descendant of the folder described.
    686698    * @param pos_parent the possible parent folder as a String
     
    710722    return false;
    711723    }
     724
    712725    public static boolean isWindows9x() {
    713726    Properties props = System.getProperties();
Note: See TracChangeset for help on using the changeset viewer.