ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <>
Subject Two possible new tasks
Date Thu, 28 Feb 2002 07:07:51 GMT
The question has come up on ant-user before, and again today, whether
there's a way to get just the filename from a full-path property value.
There are ways to do it, but they're all a bit roundabout (except the
<script> way, which, despite Erik's feeling my <script>'s are "convoluted
and wacky", is actually pretty straightforward, in that it's a single task
to do the job). But <script> aside (which, since it requires extra libs
and extra know-how, a lot of people seem to not want to get into using),
it seemed like it could be something suited to a new task, so I've written
a couple: <basename> and <dirname>. They're exceedingly simple, so I don't
imagine including them would generate much new overhead, but I wanted to
check before I put them through. Usage is:

<basename property="..." file="..."/>
<dirname property="..." dir="..."/>

(Told you they were simple :)

FTR: I've already gotten a request to send them to someone other than the
original poster, so I think the desire to have them available is probably

Also FTR: No, I won't be offended if you decide you don't want them -- so
long as you don't say the very idea was "wacky" :)



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

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

View raw message