in src/main/java/org/apache/commons/io/FileSystemUtils.java [73:109]
static {
int os = OTHER;
String dfPath = "df";
try {
String osName = System.getProperty("os.name");
if (osName == null) {
throw new IOException("os.name not found");
}
osName = osName.toLowerCase(Locale.ENGLISH);
// match
if (osName.contains("windows")) {
os = WINDOWS;
} else if (osName.contains("linux") ||
osName.contains("mpe/ix") ||
osName.contains("freebsd") ||
osName.contains("openbsd") ||
osName.contains("irix") ||
osName.contains("digital unix") ||
osName.contains("unix") ||
osName.contains("mac os x")) {
os = UNIX;
} else if (osName.contains("sun os") ||
osName.contains("sunos") ||
osName.contains("solaris")) {
os = POSIX_UNIX;
dfPath = "/usr/xpg4/bin/df";
} else if (osName.contains("hp-ux") ||
osName.contains("aix")) {
os = POSIX_UNIX;
}
} catch (final Exception ex) {
os = INIT_PROBLEM;
}
OS = os;
DF = dfPath;
}