ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antoine Levy-Lambert" <>
Subject Re: The zip update problem
Date Fri, 10 Jan 2003 11:45:43 GMT
Dear ant developers,

> > Classes interested in knowing the modification date/time of a file
> > should ask the scanner, not the file directly any more.
> Why?  They might be better of accessing the Resources directly.
The reason is that a file in a fileset can be present on the filesystem
directly, or might be a zip entry.
So we would like that packaging tasks (Zip) only access DateTime information
for purpose of ascertaining up to date status
of target with respect to source only through the Scanner (DirectoryScanner
or ZipScanner). In our new concept, the Scanner
is the class which knows where are files or zip entries and how to read
their properties.

<zip ...>
  <zipfileset src="" id="foo"/>
<copy todir="mydir">
  <fileset refid="foo"/>

this should copy all the zip entries from to the filesystem, to the
subdirectory mydir

<!--deployment procedure of -->
<get src="" dest=""/>
 <zipfileset src="" id="foodoc" dir="htdocs/manual"
prefix="docs/user-guide" />
<zipfileset src="" id="foolib" dir="lib" prefix="lib/foo" />
<copy todir="install">
  <fileset refid="foodoc"/>
  <fileset refid="foolib"/>
should copy the files located in under htdocs/manual to
install/docs/user-guide on the hard disk
and the files from the lib subdir of to install/lib/foo on the hard

This should be useful to make installation procedures, if you want to
automate the creation of your development or build environment

> > one would add two new functions in DirectoryScanner
> > long getModificationTime(String path)
this function would be to get the modification time of a file or of a zip
entry, by specifying the path of the file relative to the directory of the
> > and
> > Resource [ ]  list(String path)
> Under which circumstances would you expect more than one resource for
> a given path?
this function would be used in the scandir method of, instead
instead of
String [] newfiles=dir.list(); // fist line of scandir in
we would have
Resource [] newResources=list(dir);

So for a given path there are several resources (all the files and
directories below this path)

Maybe the name Resource for the class is confusing; it means basically File
or ZipEntry (or maybe in the future URL, file from a version control
repository, ...)

> Stefan
> --
> To unsubscribe, e-mail:   <>
> For additional commands, e-mail: <>

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message