@groovy.transform.CompileStatic abstract class OperatingSystem extends Object
| Modifiers | Name | Description |
|---|---|---|
static enum |
OperatingSystem.Arch |
Enumeration representing common hardware-operating system architectures. |
| Constructor and description |
|---|
protected OperatingSystem
() |
| Type Params | Return Type | Name and description |
|---|---|---|
|
static OperatingSystem |
current() |
|
java.util.List<File> |
findAllInPath(String name)Find all files in system search path of a certain name. |
|
File |
findInPath(String name)Locates the given exe in the system path. |
|
abstract Arch |
getArch()Architecture underlying the operating system |
|
abstract String |
getArchStr()Architecture underlying the operating system |
|
abstract java.util.List<String> |
getExecutableNames(String executablePath)Returns list of possible OS-specific decorated exe names. |
|
java.util.List<File> |
getPath()List of system search paths |
|
String |
getPathSeparator()The character used to separate elements in a system search path |
|
abstract String |
getSharedLibraryName(String libraryName)Returns OS-specific shared library name |
|
abstract String |
getSharedLibrarySuffix()OS-dependent string that is used to suffix to shared libraries |
|
abstract String |
getStaticLibraryName(String libraryName)Returns OS-specific static library name |
|
abstract String |
getStaticLibrarySuffix()OS-dependent string that is used to suffix to static libraries |
|
boolean |
isFreeBSD()Check is this is FreeBSD |
|
boolean |
isLinux()Check is this is a Linux flavour |
|
boolean |
isMacOsX()Check is this is Apple Mac OS X |
|
boolean |
isNetBSD()Check is this is NetBSD |
|
boolean |
isSolaris()Check is this is a Solaris flavour |
|
boolean |
isUnix()Check is this is any kind of Unix-like O/S |
|
boolean |
isWindows()Check is this is Microsoft Windows |
|
String |
toString()Stringize implementation |
The short name for the current operating system.
Possibly the same as System.getProperty( "os.name" ).
Name of environmental variable that holds the system search path
The version for the current operating system.
Find all files in system search path of a certain name.
name - Name to look forLocates the given exe in the system path.
name - Name of exe to search for.null if not found.Architecture underlying the operating system
OperatingSystem.Arch.UNKNOWN is it cannot be identified. In that a
caller might need to use getArchStr() to help with identification.Architecture underlying the operating system
Returns list of possible OS-specific decorated exe names.
executablePath - Name of exeList of system search paths
The character used to separate elements in a system search path
Returns OS-specific shared library name
libraryName - This can be a base name or a full name.OS-dependent string that is used to suffix to shared libraries
Returns OS-specific static library name
libraryName - This can be a base name or a full name.OS-dependent string that is used to suffix to static libraries
Check is this is FreeBSD
true if FreeBSDCheck is this is a Linux flavour
true if any kind of LinuxCheck is this is Apple Mac OS X
true if Mac OS XCheck is this is NetBSD
true if NetBSDCheck is this is a Solaris flavour
true if SolarisCheck is this is any kind of Unix-like O/S
true if any kind of Unix-like O/SCheck is this is Microsoft Windows
true if WindowsStringize implementation
Groovy Documentation