Java Is Unix isUnix()

Here you can find the source of isUnix()

Description

is Unix

License

Open Source License

Declaration

public static boolean isUnix() 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.io.File;

public class Main {
    public static boolean isUnix() {
        return (File.separatorChar == '/') || isMacOsX();
    }//ww w.ja  va  2  s .c  o m

    public static boolean isMacOsX() {
        boolean underMac = false;
        String osName = System.getProperty("os.name");
        if (osName.startsWith("Mac OS")) {
            underMac = true;
        }
        return underMac;
    }
}

Related

  1. isOsUnix()
  2. isSystemUnix()
  3. isUnix()
  4. isUnix()
  5. isUnixCompressFile(File file)