How to check if directory exists before deleting it, using ANT?

前端 未结 7 1870
星月不相逢
星月不相逢 2021-02-01 14:43

Using ANT, how can i make sure that directory exists before attempting to remove it?

As part of my current clean task, i



        
相关标签:
7条回答
  • 2021-02-01 15:43

    You can do it by ordering to delete a list of files with names equal to the name you need. It is much easier and direct than to create a special target. And you needn't any additional tools, just pure Ant.

        <delete>
            <fileset includes="name or names of file or files you need to delete"/>
        </delete>
    

    http://ant.apache.org/manual/Types/fileset.html

    0 讨论(0)
提交回复
热议问题