Package org.apache.tools.ant.taskdefs
Class Dirname
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
org.apache.tools.ant.taskdefs.Dirname
- All Implemented Interfaces:
- Cloneable
Determines the directory name of the specified file.
 This task can accept the following attributes:
 
- file
- property
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 SummaryFields inherited from class org.apache.tools.ant.ProjectComponentdescription, location, project
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidexecute()Execute this task.voidPath to take the dirname of.voidsetProperty(String property) The name of the property to set.Methods inherited from class org.apache.tools.ant.TaskbindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskTypeMethods inherited from class org.apache.tools.ant.ProjectComponentclone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
- 
Constructor Details- 
Dirnamepublic Dirname()
 
- 
- 
Method Details- 
setFile
- 
setPropertyThe name of the property to set.- Parameters:
- property- the name of the property
 
- 
executeExecute this task.- Overrides:
- executein class- Task
- Throws:
- BuildException- on error
 
 
-