Package org.apache.commons.exec
Class OS
java.lang.Object
org.apache.commons.exec.OS
Condition that tests the OS type.
 Copied and adapted from Apache Ant 1.9.6 from org.apache.tools.ant.taskdefs.condition.OS.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final StringOS family that can be tested for.static final StringOS family that can be tested for.static final StringOS family that can be tested for.static final StringOS family that can be tested for.static final StringOS family that can be tested for.static final StringOS family that can be tested for.static final StringOS family that can be tested for.static final StringOS family that can be tested for.static final StringOS family that can be tested for.static final StringOS family that can be tested for.static final StringOS family that can be tested for.static final StringOS family that can be tested for.
- 
Method SummaryModifier and TypeMethodDescriptionstatic booleanTests whether the OS on which commons-exec is executing matches the given OS architecture.static booleanTests whether the OS is in the DOS family.static booleanTests whether the OS is in the Mac family.static booleanTests whether the OS is in the Netware family.static booleanTests whether the OS is in the OpenVMS family.static booleanTests whether the OS is in the OS/2 family.static booleanTests whether the OS is in the OS/400 family.static booleanTests whether the OS is in the Tandem family.static booleanTests whether the OS is in the Unix family.static booleanTests whether the OS is in the Windows 9x family.static booleanTests whether the OS is in the Windows family.static booleanTests whether the OS is in the Windows NT family.static booleanTests whether the OS is in the z/OS family.static booleanTests whether if the OS on which commons-exec is executing matches the given OS name.static booleanTests whether the OS on which commons-exec is executing matches the given OS family, name, architecture and version.static booleanTests whether the OS on which commonss-exec is executing matches the given OS version.
- 
Field Details- 
FAMILY_9XOS family that can be tested for. "win9x"- See Also:
 
- 
FAMILY_DOSOS family that can be tested for. "dos"- See Also:
 
- 
FAMILY_MACOS family that can be tested for. "mac"- See Also:
 
- 
FAMILY_NETWAREOS family that can be tested for. "netware"- See Also:
 
- 
FAMILY_NTOS family that can be tested for. "winnt"- See Also:
 
- 
FAMILY_OS2OS family that can be tested for. "os/2"- See Also:
 
- 
FAMILY_OS400OS family that can be tested for. "os/400"- See Also:
 
- 
FAMILY_TANDEMOS family that can be tested for. "tandem"- See Also:
 
- 
FAMILY_UNIXOS family that can be tested for. "unix"- See Also:
 
- 
FAMILY_VMSOS family that can be tested for. "openvms"- See Also:
 
- 
FAMILY_WINDOWSOS family that can be tested for. "windows"- See Also:
 
- 
FAMILY_ZOSOS family that can be tested for. "z/os"- See Also:
 
 
- 
- 
Method Details- 
isArchTests whether the OS on which commons-exec is executing matches the given OS architecture.- Parameters:
- arch- the OS architecture to check for.
- Returns:
- whether if the OS matches.
 
- 
isFamilyDOSTests whether the OS is in the DOS family.- Returns:
- whether the OS is in the DOS family.
 
- 
isFamilyMacTests whether the OS is in the Mac family.- Returns:
- whether the OS is in the Mac family.
 
- 
isFamilyNetwareTests whether the OS is in the Netware family.- Returns:
- whether the OS is in the Netware family.
 
- 
isFamilyOpenVmsTests whether the OS is in the OpenVMS family.- Returns:
- whether the OS is in the OpenVMS family.
 
- 
isFamilyOS2Tests whether the OS is in the OS/2 family.- Returns:
- whether the OS is in the OS/2 family.
 
- 
isFamilyOS400Tests whether the OS is in the OS/400 family.- Returns:
- whether the OS is in the OS/400 family.
 
- 
isFamilyTandemTests whether the OS is in the Tandem family.- Returns:
- whether the OS is in the Tandem family.
 
- 
isFamilyUnixTests whether the OS is in the Unix family.- Returns:
- whether the OS is in the Unix family.
 
- 
isFamilyWin9xTests whether the OS is in the Windows 9x family.- Returns:
- whether the OS is in the Windows 9x family.
 
- 
isFamilyWindowsTests whether the OS is in the Windows family.- Returns:
- whether the OS is in the Windows family.
 
- 
isFamilyWinNTTests whether the OS is in the Windows NT family.- Returns:
- whether the OS is in the Windows NT family.
 
- 
isFamilyZOSTests whether the OS is in the z/OS family.- Returns:
- whether the OS is in the z/OS family.
 
- 
isNameTests whether if the OS on which commons-exec is executing matches the given OS name.- Parameters:
- name- the OS name to check for.
- Returns:
- whether the OS matches.
 
- 
isOsTests whether the OS on which commons-exec is executing matches the given OS family, name, architecture and version.- Parameters:
- family- The OS family.
- name- The OS name.
- arch- The OS architecture.
- version- The OS version.
- Returns:
- whether the OS matches.
 
- 
isVersionTests whether the OS on which commonss-exec is executing matches the given OS version.- Parameters:
- version- the OS version to check for.
- Returns:
- whether if the OS matches.
 
 
-