org.apache.tools.ant.taskdefs.condition

Class HasFreeSpace

Implemented Interfaces:
Condition

public class HasFreeSpace
extends java.lang.Object
implements Condition

<hasfreespace>

Condition returns true if selected partition has the requested space, false otherwise.

Since:
Ant 1.7

Method Summary

boolean
eval()
Evaluate the condition.
String
getNeeded()
The amount of free space required
String
getPartition()
The partition/device to check
void
setNeeded(String needed)
Set the amount of space required.
void
setPartition(String partition)
Set the partition name.

Method Details

eval

public boolean eval()
            throws BuildException
Evaluate the condition.
Specified by:
eval in interface Condition
Returns:
true if there enough free space.
Throws:
BuildException - if there is a problem.

getNeeded

public String getNeeded()
The amount of free space required
Returns:
the amount required

getPartition

public String getPartition()
The partition/device to check
Returns:
the partition.

setNeeded

public void setNeeded(String needed)
Set the amount of space required.
Parameters:
needed - the amount required.

setPartition

public void setPartition(String partition)
Set the partition name.
Parameters:
partition - the name to use.