哪些文件是通过蚂蚁拉链任务默认排除? [英] What files are excluded by default from Ant zip task?
问题描述
我运行一个Ant任务拉链拉链要在Unix系统上的一个目录的全部内容:
I'm running an Ant zip task to zip the whole contents of a directory on Unix systems:
<zip destfile="${deploy}/test.zip">
<zipfileset dir="/home/mydir" />
</zip>
拉链创建
后,和检查的内容,我可以看到一些配置文件,Visual Studio中的特定文件和其他类似Mac OS的.DS_STORE文件被排斥在外的拉链。
After the zip is created, and checking the contents, I can see that some config files, Visual Studio specific files and others like the Mac OS .DS_STORE file are left out the zip.
有没有什么规则如下蚂蚁决定将不包含哪些文件?
Is there any rule ant follows to decide what files will not be included?
我需要提前知道,因为我需要荏苒(目前使用Java)之前创建该目录的现有文件列表。现在,我不包括(使用File.isHidden()和的isdirectory()方法)的所有目录和隐藏文件,但名单仍得到一些文件的蚂蚁左派出来(例如,vssver.scc
I need to know in advance since I need to create a list of existing files on that directory before zipping (currently using Java). Right now I'm excluding all directories and hidden files (using File.isHidden() and isDirectory() methods) , but the list is still getting some of the file Ant lefts out (for example, vssver.scc
推荐答案
试试这个:
<defaultexcludes echo="true"/>
http://ant.apache.org/manual/Tasks/defaultexcludes.html
请注意,这是所有使用文件集的所有蚂蚁TAKS使用,而不仅仅是压缩任务。
Note that this is used across all Ant taks that use filesets, not just the zip task.
这篇关于哪些文件是通过蚂蚁拉链任务默认排除?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!