【发布时间】:2013-09-24 12:16:56
【问题描述】:
我有以下文件:
C:/test/files/1f.txt, contains the string "file1"
C:/test/files/2f.txt, contains the string "file2"
C:/test/files/3f.txt, contains the string "file3"
如果我使用以下 Ant 任务(Ant 1.6.5):
<concat destfile="C:/test/concat.txt">
<fileset dir="C:/test/files">
<include name="*.txt" />
</fileset>
</concat>
concat.txt 的内容是否总是file1file2file3,或者文件的字母顺序可能没有保留,因此例如file2file1file3?那在 Windows、Linux 和 Solaris 操作系统上呢?
我在 Windows 上尝试过几次,似乎是的,订单被保留了,但我需要确定这一点。如果不是,您能否提供一个反例,其中不保留字母顺序?
PS:在 Ant 1.6.5 中不允许在 <concat> 中嵌套 <sort>,但仅在 Ant 1.7+ 中。
【问题讨论】: