| Modifiers | Name | Description |
|---|---|---|
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()Returns a representation of the operating system that the JVM currently runs on. |
|
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. |
|
Arch |
getArch()Architecture underlying the operating system |
|
String |
getArchStr()Architecture underlying the operating system |
|
String |
getExecutableName(String executablePath)Returns OS-specific decorated exe name. |
|
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 |
|
String |
getScriptName(String scriptPath)Returns OS-specific decorated script name. |
|
String |
getSharedLibraryName(String libraryName)Returns OS-specific shared library name |
|
String |
getSharedLibrarySuffix()OS-dependent string that is used to suffix to shared libraries |
|
String |
getStaticLibraryName(String libraryName)Returns OS-specific static library name |
|
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.
Returns a representation of the operating system that the JVM currently runs on.
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 OS-specific decorated exe name.
executablePath - Name of exeReturns 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 decorated script name.
scriptPath - Name of scriptReturns 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