ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "External Lists" <>
Subject Re: Task functionality next version Ant
Date Fri, 05 May 2000 17:43:09 GMT
> How about using "src" and "dest" for all of them instead of "srcfile" v.s.
> "srcdir":
>   <copy src="file" dest="file" />
>   <delete src="file" />
>   <move src="file" dest="file" />
> and let the code detect whether "file" is a directory or a regular file
> act accordingly?  If "includes" and/or "excludes" are specified, then both
> "src" and "dest" must be directories.  If there are no "includes" and/or
> "exlcudes", and "src" is a directory then "dest" must be a directory.  If
> "src" is a regular file, "dest" can be either a regular file (existing or
> not) or a directory.

I worry about having a build script whose behavior can vary depending on
whether it happens to find a file vs. a directory at runtime.  I much prefer
being fully explicit in task definitions, and not depending on detecting
what is there to alter behavior.  That's why Unix has an "rm" command AND an
"rmdir" command, for example, so you have to be explicit on your intentions.


View raw message