ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mario Madunic" <Mario_Madu...@newflyer.com>
Subject RE: How to echo the empty directories of a fileset ?
Date Thu, 13 May 2010 18:07:29 GMT
Isn't there a new task named resourcecount. Maybe you could use this in conjunction with a
test and if the resourcecount is 0 then echo it is empty. Or am I missing what you are trying
to do?


Marijan (Mario) Madunic
Publishing Specialist
New Flyer Industries

-----Original Message-----
From: Bruno Medeiros [mailto:bruno.do.medeiros@gmail.com] 
Sent: Thursday, May 13, 2010 12:49 PM
To: user@ant.apache.org
Subject: How to echo the empty directories of a fileset ?

Hello. If I do something like this:

	<copy todir="${destination.dir}" verbose="true" >
		<fileset dir="${projects.dir}/" >
			<include name="*" />
		</fileset>
	</copy>

and projects.dir has some empty directories, then those directories
will be copied to destination.dir .
Is this normal behavior? (It seems strange to me that a fileset would
contain empty directories)
And if that's the case, how can I echo the empty directories of a
fileset? I am familiar with this:

	<pathconvert refid="my.fileset" property="my.files.list"> pathsep=","/>
	<echo message="${my.files.list}"/>

But it only prints the files of the fileset, not the directories.

Regards,
Bruno

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


--------------------------------------------------------------------
Please consider the environment before printing this e-mail.

CONFIDENTIALITY STATEMENT: This communication (and  any and all information or material transmitted
with this communication) is confidential, may be privileged and is intended only for the use
of the intended recipient. If you are not the intended recipient, any review, retransmission,
circulation, distribution, reproduction, conversion to hard copy, copying or other use of
this communication, information or material is strictly prohibited and may be illegal. If
you received this communication in error or if it is forwarded to you without the express
authorization of New Flyer, please notify us immediately by telephone or by return email and
permanently delete the communication, information and material from any computer, disk drive,
diskette or other storage device or media. Thank you.


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


Mime
View raw message