ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Magesh Umasankar" <umag...@rediffmail.com>
Subject [PATCH] Consolidated Expand/Untar with listing and verbose attributes.
Date Thu, 08 Nov 2001 01:43:58 GMT

Hi,

I have refactored Untar such that it extends from Expand.  

The reasons being:
1.  Unzip, unjar, unwar and untar being so similar not 
only in functionality, but also in the code that we have 
right now.

2.  For easier maintenance - I have added two new 
attributes (outfile and verbose).  It was easier for me
to consolidate these two tasks together so that input
validations, common functions, etc. need not be
maintained in parallel two places.

This patch also fixes the following bug - 

The dest attribute wasn't being checked to see
if it was a directory (when it exists, ie).

The features provided are:

1.  Untar's src attribute can now be a directory
similar to how unzip behaves now.

2.  outfile can be specified: setting this causes the task 
to list the files contained in the archive into outfile.
(Similar to the t flag in jar/tar commands).

3.  When outfile is specified, if verbose is also set, 
a detailed list of contents of the archive is output
into outfile.
(Similar to the v flag in jar/tar commands).

The motivations behind these new features:

1. To be able to view(list) the contents of the archive
without performing a full extract.

2. To provide basis for finding diff between two tars, 
for example.

3. Consolidate near identical expand/untar tasks.

Magesh
 

Mime
View raw message