com.darwinsys.lang.SysDep Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of darwinsys-api Show documentation
Show all versions of darwinsys-api Show documentation
Ian Darwin's assorted Java stuff,
assembled as an API.
// BEGIN main
package com.darwinsys.lang;
/** Some things that are System Dependent.
* All methods are static, like java.lang.Math.
* @author Ian Darwin
*/
public class SysDep {
/** Return the name of the Null device on platforms which support it,
* or "jnk" otherwise.
*/
public static String getDevNull() {
String sys = System.getProperty("os.name");
if (sys==null || sys.indexOf("Mac") >= 0)
return "jnk";
if (sys.startsWith("Windows"))
return "NUL:";
return "/dev/null";
}
}
// END main