ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: Question about Basedir
Date Wed, 23 Jun 2004 06:01:05 GMT
On Tue, 22 Jun 2004, Wascally Wabbit <wascallywabbit@earthling.net>
wrote:
> At 05:24 AM 6/22/2004, you wrote:

>> you could try the following:
>>
>>    File basedir = getProject().getBaseDir();
>>    File targetPath = new File( basedir, targetPackage );
>>
> 
> Or just:
>      File targetPath = getProject().resolveFile(targetPackage);

Yes, that's what I'd recommend as well.

resolveFile does a few things more than just resolving relative file
names, it also ensures that slashes are leaning into the right
direction for your OS and drive letters are uppercased on Windows for
example.

Stefan

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


Mime
View raw message