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="foo.zip" id="foo"/> </zip> <copy todir="mydir"> <fileset refid="foo"/> </copy> this should copy all the zip entries from foo.zip to the filesystem, to the subdirectory mydir <!--deployment procedure of foo.zip --> <get src="ftp://somehost.acme.com:/pub/foo.zip" dest="foo.zip"/> <zipfileset src="foo.zip" id="foodoc" dir="htdocs/manual" prefix="docs/user-guide" /> <zipfileset src="foo.zip" id="foolib" dir="lib" prefix="lib/foo" /> <copy todir="install"> <fileset refid="foodoc"/> <fileset refid="foolib"/> </copy> should copy the files located in foo.zip under htdocs/manual to install/docs/user-guide on the hard disk and the files from the lib subdir of foo.zip to install/lib/foo on the hard disk 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 fileset. > > > 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 Directory.java, instead of java.io.File.list instead of String [] newfiles=dir.list(); // fist line of scandir in DirectoryScanner.java 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: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
