Summary: | Tar task command additional features | ||
---|---|---|---|
Product: | Ant | Reporter: | Don Keeting <donkeeting> |
Component: | Core tasks | Assignee: | Ant Notifications List <notifications> |
Status: | NEW --- | ||
Severity: | enhancement | ||
Priority: | P3 | ||
Version: | 1.4.1 | ||
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | All |
Description
Don Keeting
2002-05-10 16:40:57 UTC
1. you can use <untar> to expand the file, then things like <available> to look at what was expanded 2. In ant 1.5 you can load a text file into a single property using <propertyfile>; you can then use that as the includes= attr for tar Enough? Correction to Steve's (2) - he meant <loadfile>. Second correction to Steve's (2) -- since <tar> forms an implicit fileset, it won't like a list of full-path filenames in the 'includes' (same problem that all the implicit-fileset tasks have). And I can't tell if the the 'fullpath' attribute of the nested <tarfileset> attribute would take a list of filenames, since so far I haven't even managed to get it to work with one filename :( 1. Yes, I agree that this could be done, but there are situations where this is not pratical, or efficient. Example: Suppose you have an existing directory structure containing many files, and you have a tar file which might contain some of the same files and some new files. Suppose you would like to know the contents of the tar file. If you untar the file, you will not be able to tell which files came from the tar, and which files were preexisting, or both. A nice feature would be to have the ability to do the equivilant of the tar command: "tar -tvf tarfile.tar" or "tar -tf tarfile.tar". I would like to be able to make the table of contents available. 2. In version 1.4.1, if I use this: <tar tarfile="${build.dir}/listfile.tar" basedir="${src.dir}" includesfile="listfile.txt" /> where "listfile.txt" is contained in the basedir, and the file contains filenames separated by newlines, it will tar all of the files from the list. The problem is, in my case the basedir will be the root directory, so I need to be able to include the list of fully qualified paths of files to be included in the tar file. |