正在创建目录
com/foo/bar
意味着先创造
com
然后
com/foo
-即三个目录。
我的Ant版本稍微详细一点,显示了每个创建操作:
$ ant -v
Apache Ant(TM) version 1.10.2 compiled on February 3 2018
... deleted for brevity ....
[mkdir] Created dir: /stack/ant/dst
[copy] com/foo/bar2/x.txt added as com/foo/bar2/x.txt doesn't exist.
[copy] omitted as /stack/ant/dst is up to date.
1 [copy] com added as com doesn't exist.
2 [copy] com/foo added as com/foo doesn't exist.
3 [copy] com/foo/bar added as com/foo/bar doesn't exist.
4 [copy] com/foo/bar2 added as com/foo/bar2 doesn't exist.
[copy] Copying 1 file to /stack/ant/dst
[copy] Copying /stack/ant/src/com/foo/bar2/x.txt to /stack/ant/dst/com/foo/bar2/x.txt
[copy] Copied 4 empty directories to 1 empty directory under /stack/ant/dst
什么时候?
bar2
创建时,它(显然)是空的,因此包含在四个计数中,即使在复制完成时它是非空的。