ant文件筛选
来源:互联网 发布:linux怎么选中命令复制 编辑:程序博客网 时间:2024/06/15 04:53
常用的核心的selector有:
<contains> - 用来选择包含指定字符串的文件
<date> - 用来选择在某个特定时间前或后修改的文件
<depend> - Select files that have been modified more recently than equivalent files elsewhere
<depth> - 用来选择指定目录深度的文件
<different> - Select files that are different from those elsewhere
<filename> - 用来选择文件名匹配特定模式的文件。等价于include和exclude的patternset。
<present> - 用来选择在某个位置存在或不存在的文件
<containsregexp> - 用来选择匹配指定正则表达式的文件
<size> - 用来选择比指定size大或小的文件
<type> - Select files that are either regular files or directories.
<modified> - Select files if the return value of the configured algorithm is different from that stored in a cache.
<signedselector> - Select files if they are signed, and optionally if they have a signature of a certain name.
<scriptselector> - Use a BSF or JSR 223 scripting language to create your own selector
<readable> - 选择有readable属性的文件
<writable> - 选择有writable属性的文件
选择包含script的所有的html文件
<fileset dir="${doc.path}" includes="**/*.html"> <contains text="script" casesensitive="no"/></fileset>选择所有在January1,2001前修改的JAR文件
<fileset dir="${jar.path}" includes="**/*.jar"><date datetime="01/01/2001 12:00 AM" when="before"/></fileset>
选择所有满足正则表达式的txt文件
<fileset dir="${doc.path}" includes="*.txt"><containsregexp expression="[4-6]\.[0-9]"/></fileset>selector与patternset等价:
<fileset dir="${server.src}" casesensitive="yes"><filename name="**/*.java"/><not><filename name="**/*Test*"/></not></fileset>
等价于
<fileset dir="${server.src}" casesensitive="yes"><filename name="**/*.java"/><filename name="**/*Test*" negate="true"/></fileset>
等价于
<fileset dir="${server.src}" casesensitive="yes"><include name="**/*.java"/><exclude name="**/*Test*"/></fileset>
selector容器可以包含其他的selector,常用的selector容器有
<and>
<contains>
<custom>
<date>
<depend>
<depth>
<filename>
<majority>
<none>
<not>
<or>
<present>
<selector>
<size>
例如选择比4096bytes大且从上个millenium没有更新的JAR文件
<fileset dir="${dist}" includes="**/*.jar"><and><size value="4" units="Ki" when="more"/><date datetime="01/01/2001 12:00 AM" when="before"/></and></fileset>
- ant文件筛选
- 筛选文件
- java代码筛选文件
- python:文件内容筛选
- filters文件,文件筛选器
- 利用 FreeFileSync 筛选文件 commit
- 批量文件筛选处理shell
- pyhton 遍历文件夹,筛选文件
- 前端上传文件,筛选文件格式
- java使用FileFilter筛选文件
- JavaFile筛选读取文件内容
- ANT工程打包文件
- ant 文件模板
- Ant构建文件
- ant 拷贝文件
- 用ANT写文件
- ant delete文件
- ant 编译java文件
- iOS开发UI篇—手写控件,frame,center和bounds属性
- 目标管理是项目管理的核心思想之
- 不要垃圾时间
- MySQL基本语法命令
- Sicily 1194. Message Flood
- ant文件筛选
- Github
- Android Studio开发基础之启动Service,并通过从Activity向Service传递数据
- bash shell函数的定义及变量的简单说明
- 最近在用codeigniter 备注下数据库操作方法
- 尝试使用Volley
- html canvas 截图
- 免费生成MP3外链
- 阅读程序4