Apache Ant Concat 任务2024 年 8 月 28 日 | 阅读 2 分钟 连接用于将一个或多个文件连接到一个文件中。 如果资源列表为空且 ignoreempty 为 true,则会创建一个新文件(如果该文件不存在)。 从 Apache Ant 1.7.1 开始,此任务可以用作资源集合,它将只返回一个资源。 资源集合用于选择要连接的资源。 没有单个属性可以指定要连接的单个资源文件。 Apache Ant Concat 任务属性属性 | 描述 | 必需 |
---|
destfile | 连接流的目标文件。 | 不能 | append | 指定是否应追加 destfile 指定的文件。 | 不能 | force | 指定是否应写入 destfile 指定的文件。 | 不能 | overwrite | 指定是否应写入 destfile 指定的文件。 | 不能 | forceReadOnly | 覆盖只读目标文件。 | 不能 | encoding | 指定输入文件的编码。 | 不能 | outputencoding | 写入输出文件时使用的编码。 | 不能 | fixlastline | 指定是否检查每个连接的文件是否以新行结尾。 | 不能 | eol | 指定 fixlastline 属性使用的行尾字符是什么。 | 不能 | binary | 如果此属性设置为 true,则任务将以字节为单位连接文件。 | 不能 | ignoreempty | 指定如果源资源列表为空,是否应创建 destfile 指定的文件。 | 否; 默认为 true | resourcename | 指定如果此任务作为资源公开,则报告的名称。 | 不能 |
Apache Ant Concat 示例将字符串连接到文件 将一系列文件连接到控制台
|