Apache Ant: file selection with a set of files?

It is very easy to select a file with a specific file name or file using filesetANT, however I have not yet figured out how to write a set of files that deletes all files with a file name starting with a point, such as .builtpathand .hgignorebut excluding .htaccess;

Here is my current file:

<delete includeemptydirs="true">

    <fileset dir="${temp.dir}/fromRepo">            
        <exclude name=".htaccess"/>
        <include name="**/*" /> <!-- How to select files starting with .?!-->
    </fileset>

</delete>
+3
source share
1 answer

We suggest you to try:

<delete includeemptydirs="true">
    <fileset dir="${temp.dir}/fromRepo">            
        <exclude name="**/.htaccess"/>
    </fileset>
</delete>

- - ".htaccess", , ".htaccess" . ** .htaccess Ant , ".htaccess", .

, - , 'global' include.

, - includeemptydirs true . , . : , .htaccess, , , .htaccess, - , .

+2

Source: https://habr.com/ru/post/1784394/


All Articles