Name
mkdir
Synopsis
Creates a directory if it does not already exist. Also creates parent directories as needed.
Attributes
-
dir
(all, File, Y) The directory to create.
Content
None.
Example Usage
This task is commonly used in a prepare
target
that other targets depend on. This ensures that necessary destination
directories are created before other targets are executed.
<target name="prepare"><mkdir dir="${builddir}"/>
<mkdir dir="${deploydir}/docs"/>
</target> <target name="compile" depends="prepare"> ... </target>
See Also
See the delete task for information on removing files and directories.
Get Ant: The Definitive Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.