ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael J. Sikorsky" ...@servidium.com>
Subject [PATCH] Use Filesets in the Touch Task.
Date Tue, 13 Mar 2001 11:48:05 GMT
Hi all,

Attached is a patch to the Touch task so that it can work with Filesets in
addition to its current single-file functionality.  The attached Zip file
contains the diffs, updated docs, and source.  For convenience, I've also
separately attached just the Touch.java.diff file.

Why?

Being able to timestamp an entire set of files, rather than just a single
file, is useful.  For example, ensuring that all files in a release have
been timestamped to the exact same date can be used to quickly spot if
someone modified a file.

Examples:

To touch a single file that exists ("myfile.txt"):
<touch file="myfile.txt" datetime="04/04/04 4:04 pm"/>

To touch all files in the src_dir directory:
<touch datetime="05/05/05 5:05 pm">
  <fileset dir="src_dir"/>
</touch>

To touch and create a new file that doesn't exist ("newfile.txt"), and to
also touch all the java files in the src_dir directory:
<touch file="newfile.txt" datetime="06/06/06 6"06 pm">
  <fileset dir="src_dir"  includes="**/*.java" />
</touch>

mj

---
Michael J. Sikorsky
Servidium Inc.
http://www.servidium.com
Jaydoh(TM): Build better web applications faster using pre-built
components/services, an enhanced Model 2 Architecture and the J2EE Patterns.



Mime
View raw message