ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: The zip update problem
Date Fri, 10 Jan 2003 10:08:17 GMT
On Thu, 9 Jan 2003, Antoine Levy-Lambert <>

> 1) ZipScanner class
> it is currently implemented in such a way that the
> getIncludedFiles() function answers with an array containing as only
> element the name of the zip file itself.
> I believe we should change the implementation of the class so that
> ZipScanner.getIncludedFiles() gives the list of entries in the
> archive which match the include and exclude patterns.
> Does anyone see a danger of breaking something here ?

Yes (and no).

The only classes using ZipScanner are Zip and ZipFileSet.  As Zip
would get adjusted, we won't have a problem here, but ...

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

would break.  Copy would try to copy files with the names of the
ZipEntries.  Then again, a construct like this would be silly, as it
wouldn't really work right now either.

> maybe we could create such a Resource class under
> it needs only two instance variables :
> String FileName and long ModificationTime or something like that


> Then the DirectoryScanner could store the results of
> scanning internally as vectors of Resource


> 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.

> one would add two new functions in DirectoryScanner
> long getModificationTime(String path)

See above.

> and
> Resource [ ]  list(String path)

Under which circumstances would you expect more than one resource for
a given path?


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

View raw message