Top Description Fields Constructors Methods
org.apache.tools.ant.taskdefs

public Class Dirname

extends Task
Class Inheritance
Imports
java.io.File, org.apache.tools.ant.BuildException, .Task

Determines the directory name of the specified file. This task can accept the following attributes: Both file and property are required.

When this task executes, it will set the specified property to the value of the specified file up to, but not including, the last path element. If file is a file, the directory will be the current directory.

Since
Ant 1.5

Field Summary

Modifier and TypeField and Description
private File
private String
Inherited from org.apache.tools.ant.Task:
targettaskNametaskTypewrapper

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
execute()

Overrides org.apache.tools.ant.Task.execute.

Execute this task.
public void
setFile(File
a File value
file
)

Path to take the dirname of.

public void
setProperty(String
the name of the property
property
)

The name of the property to set.

Inherited from org.apache.tools.ant.Task:
bindToOwnergetOwningTargetgetRuntimeConfigurableWrappergetTaskNamegetTaskTypegetWrapperhandleErrorFlushhandleErrorOutputhandleFlushhandleInputhandleOutputinitisInvalidloglogloglogmaybeConfigureperformreconfiguresetOwningTargetsetRuntimeConfigurableWrappersetTaskNamesetTaskType

Field Detail

fileback to summary
private File file
propertyback to summary
private String property

Constructor Detail

Dirnameback to summary
public Dirname()

Method Detail

executeback to summary
public void execute() throws BuildException

Overrides org.apache.tools.ant.Task.execute.

Execute this task.

Annotations
@Override
Exceptions
BuildException:
on error
setFileback to summary
public void setFile(File file)

Path to take the dirname of.

Parameters
file:File

a File value

setPropertyback to summary
public void setProperty(String property)

The name of the property to set.

Parameters
property:String

the name of the property