Apache Ant Tasks 简明教程 ANT Tasks - MkDir Apache Ant Tasks 简明教程 Apache Ant Tasks - MkDir Description Mkdir 任务创建目录。在必要时也创建不存在的父目录。如果目录已经存在,则不执行任何操作。 Mkdir task creates a directory. Also non-existent parent directories are created, when necessary. Does nothing if the directory already exists. Properties Sr.No Attributes & Description 1 DIR The directory to create. Example Usage 使用以下内容创建 build.xml − Create build.xml with the following content − <?xml version="1.0"?> <project name="TutorialPoint" default="info"> <mkdir dir="dist"/> <target name="info"> </target> </project> Output 在上述构建文件上运行 Ant 会生成以下输出: Running Ant on the above build file produces the following output − F:\tutorialspoint\ant>ant Buildfile: F:\tutorialspoint\ant\build.xml [mkdir] Created dir: F:\tutorialspoint\ant\dist info: BUILD SUCCESSFUL Total time: 0 seconds