Browse Source

Added some javadocs for OS condition.

Submitted by: "Jeff Tulley" <JTULLEY@novell.com>


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@269798 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Donald 23 years ago
parent
commit
89aa7775a8
1 changed files with 16 additions and 0 deletions
  1. +16
    -0
      src/main/org/apache/tools/ant/taskdefs/condition/Os.java

+ 16
- 0
src/main/org/apache/tools/ant/taskdefs/condition/Os.java View File

@@ -65,8 +65,24 @@ import org.apache.tools.ant.BuildException;
public class Os implements Condition { public class Os implements Condition {
private String family; private String family;


/**
* Sets the desired OS family type
*
* @param f The OS family type desired<br />
* Possible values:<br />
* <ul><li>dos</li>
* <li>mac</li>
* <li>netware</li>
* <li>unix</li>
* <li>windows</li></ul>
*/
public void setFamily(String f) {family = f.toLowerCase();} public void setFamily(String f) {family = f.toLowerCase();}


/**
* Determines if the OS on which Ant is executing matches the type of
* that set in setFamily.
* @see Os#setFamily(String)
*/
public boolean eval() throws BuildException { public boolean eval() throws BuildException {
String osName = System.getProperty("os.name").toLowerCase(); String osName = System.getProperty("os.name").toLowerCase();
String pathSep = System.getProperty("path.separator"); String pathSep = System.getProperty("path.separator");


Loading…
Cancel
Save