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

前端 未结 7 1866
星月不相逢
星月不相逢 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.

        
            
        
    

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

提交回复
热议问题