ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <DDevie...@lgc.com>
Subject RE: Deleting filesets with directories
Date Tue, 16 Jul 2002 14:39:01 GMT
I think "**/tmpdir/" is just a short hand of "**/tmpdir/**". Your other
patterns do not some match files inside the tmpdirs, thus the directories
are not empty, thus they're not deleted. I'd guess you have subdirectories
in your tempdir, which is why "**/tmpdir/*" didn't work (did not match any
files in a subdirectory).

A little confusing yes, but totally ant-normal... --DD

-----Original Message-----
From: Mark Reid [mailto:mark.reid@proxima-tech.com] 
Sent: Monday, July 15, 2002 10:54 PM
To: Ant Users List
Subject: Deleting filesets with directories

Hi all,

I've come across this frustrating little problem in Ant1.5b1 and was
wondering if it could and/or should be fixed in the next release of Ant. 

I have a number of temporary directories the following directory structure:
    topdir/dirA/tmpdir
    topdir/dirB/tmpdir
    topdir/dirC/tmpdir

I thought I could delete all the tmpdirs with this Ant task:

<delete includeEmptyDirs="true">
    <fileset dir="topdir" includes="**/tmpdir"/>
</delete>

but this does nothing. Then I tried this (notice the additional /* in the
includes attribute):

<delete includeEmptyDirs="true">
    <fileset dir="topdir" includes="**/tmpdir/*"/>
</delete>

and finally this (removed the * from the above task):

<delete includeEmptyDirs="true">
   <fileset dir="topdir" includes="**/tmpdir/"/>
</delete>

This last one did what I wanted, which was to delete the tmpdirs and all
their contents from each of dirA, dirB and dirC.

Is it just me, or should the first of these three examples done the same
thing?

Thanks,

Mark.
---
Mark Reid
Proxima Technology, Inc.
http://www.proxima-tech.com


--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message