Mkdir (Apache Ant API)
Description: declaration: package: org.apache.tools.ant.taskdefs, class: Mkdir

Package org.apache.tools.ant.taskdefs

# Class Mkdir

java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
org.apache.tools.ant.taskdefs.Mkdir

All Implemented Interfaces:
  `Cloneable`

public class Mkdir extends Task
Creates a given directory. Creates a directory and any non-existent parent directories, when necessary

Since:
  Ant 1.1

- ## Field Summary

  ### Fields inherited from class org.apache.tools.ant.Task

  `target, taskName, taskType, wrapper`

  ### Fields inherited from class org.apache.tools.ant.ProjectComponent

  `description, location, project`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Mkdir()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `execute()`
  create the directory and all parents
  `File`
  `getDir()`
  Get the directory to create.
  `void`
  `setDir(File dir)`
  the directory to create; required.

  ### Methods inherited from class org.apache.tools.ant.Task

  `bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType`

  ### Methods inherited from class org.apache.tools.ant.ProjectComponent

  `clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject`

  ### Methods inherited from class java.lang.Object

  `equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### Mkdir

    public Mkdir()

- ## Method Details

  - ### execute

    public void execute() throws BuildException
    create the directory and all parents
    Overrides:
      `execute` in class `Task`
    Throws:
      `BuildException` - if dir is somehow invalid, or creation failed.

  - ### setDir

    public void setDir(File dir)
    the directory to create; required.
    Parameters:
      `dir` - the directory to be made.

  - ### getDir

    public File getDir()
    Get the directory to create.
    Returns:
      File