ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <>
Subject Re: Two possible new tasks
Date Thu, 28 Feb 2002 08:47:53 GMT
--- Steve Loughran <> wrote:
> +1 if you can come up with some good tests. I am not sure about
> basename. does it mean the name of the file up to but not including the
> file itself, or is it the file name without any directories.

It basically does what the *nix 'basename' command does -- gives you the
last element of a path (optionally, minus a suffix), whether that's a
filename or the last directory element doesn't matter. But thanks for
asking, since it reminded me that I forgot to allow for a 'suffix'
attribute. So, to clarify (thanks, Tim, for the attr correction earlier),
here's the usage:

<basename property="..." file="..." suffix="..."/> [suffix attr optional]
<dirname  property="..." file="..."/>

> <splitfilename srcFile="somefile.xml" dirProperty="dir"
> filenameProperty="filename" />
> thoughts?#

But the idea is that you're setting a property -- so to do yours, you'd
probably need to have some kind of nested element thing, so you could
specify the property name you want set to the dir and filename (since I
don't see how you could ever reference the 'dirProperty' and
'filenameProperty' that you have).



Do You Yahoo!?
Yahoo! Greetings - Send FREE e-cards for every occasion!

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message