home *** CD-ROM | disk | FTP | other *** search
- package com.sfs.os;
-
- import java.io.File;
- import java.util.Vector;
-
- // $FF: renamed from: com.sfs.os.OS
- public class class_0 {
- static boolean iswindows;
- static boolean ismsvm;
- static boolean isos2;
-
- public static Vector getDrives() {
- Vector var0 = new Vector(28);
-
- for(char[] var1 = new char[]{'a', ':'}; var1[0] <= 'z'; ++var1[0]) {
- String var2 = new String(var1);
- File var3 = new File(var2 + File.separator);
- if (var3.isDirectory()) {
- var0.addElement(var2);
- }
- }
-
- return var0;
- }
-
- public static boolean isMsVM() {
- return ismsvm;
- }
-
- public static boolean isOS2() {
- return isos2;
- }
-
- public static boolean isWindows() {
- return iswindows;
- }
-
- public static boolean hasDrives() {
- return isos2 || iswindows;
- }
-
- public static void main(String[] var0) {
- System.out.println("drives: " + getDrives() + System.getProperty("os.name"));
- System.out.println(isWindows() ? "isWindows=true" : "isWindows=false");
- System.getProperties().list(System.out);
- }
-
- static {
- if (System.getProperty("os.name").startsWith("Windows", 0)) {
- iswindows = true;
- } else {
- iswindows = false;
- if (System.getProperty("os.name").startsWith("OS/2", 0)) {
- isos2 = true;
- } else {
- isos2 = false;
- }
- }
-
- if (System.getProperty("java.vendor").equals("Microsoft Corp.")) {
- ismsvm = true;
- } else {
- ismsvm = false;
- }
- }
- }
-