Re: calculating relative paths

2009-09-09 Thread Andy Stevens
2009/9/9 : > The enhancement of seems to be good candidate. ... > > --> ../my/file.txt ../file.txt, surely? my/dir + .. -> my, my/dir + ../my -> my/my, my/dir + ../my/file.txt -> my/my/file.txt You might also like to add a test case for --> ../dir1/file.txt which I don't think is covered b

AW: calculating relative paths

2009-09-09 Thread Jan.Materne
nrw.de [mailto:jan.mate...@rzf.fin-nrw.de] >Gesendet: Mittwoch, 9. September 2009 11:30 >An: user@ant.apache.org >Betreff: AW: calculating relative paths > >>Perhaps I should raise an enhancement request. A couple of new >>attributes "relative" (default false) and &quo

AW: calculating relative paths

2009-09-09 Thread Jan.Materne
>Perhaps I should raise an enhancement request. A couple of new >attributes "relative" (default false) and "basedir" (default >${basedir}) that can be used in conjunction with the "location" >attribute seem a relatively minor addition, and would reduce my >problem to relative="true" basedir="${bui

Re: calculating relative paths

2009-09-08 Thread Andy Stevens
2009/9/8 Francis GALIEGUE : > On Tue, Sep 8, 2009 at 21:03, Andy > Stevens wrote: >> 2009/9/8 Francis GALIEGUE : >>> On Tue, Sep 8, 2009 at 08:41, Andy >>> Stevens wrote: Hi, Is there an easy way to calculate an arbitrary relative path between two files? Part of my Ant scr

Re: calculating relative paths

2009-09-08 Thread Francis GALIEGUE
On Tue, Sep 8, 2009 at 21:03, Andy Stevens wrote: > 2009/9/8 Francis GALIEGUE : >> On Tue, Sep 8, 2009 at 08:41, Andy >> Stevens wrote: >>> Hi, >>> >>> Is there an easy way to calculate an arbitrary relative path between two >>> files? >>> Part of my Ant script copies a default configuration file

Re: calculating relative paths

2009-09-08 Thread Andy Stevens
2009/9/8 Jan.Materne : > I am not aware of any built in task, but there is a method in FileUtils you > could use. > > Jan > > > > > > > > Strange, that looks like it ought to be just the job, but with build.dir=build buil

Re: calculating relative paths

2009-09-08 Thread Andy Stevens
2009/9/8 Francis GALIEGUE : > On Tue, Sep 8, 2009 at 08:41, Andy > Stevens wrote: >> Hi, >> >> Is there an easy way to calculate an arbitrary relative path between two >> files? >> Part of my Ant script copies a default configuration file to a build >> folder, in the course of which I modify it (w

Re: calculating relative paths

2009-09-08 Thread Dominique Devienne
On Tue, Sep 8, 2009 at 1:41 AM, Andy Stevens wrote: > Is there an easy way to calculate an arbitrary relative path between two > files? Indirectly, with , which computes the rel. path between a set of files and the jar. May be subverted into doing it I think. --DD ---

AW: calculating relative paths

2009-09-08 Thread Jan.Materne
cation()); } } } >-Ursprüngliche Nachricht- >Von: Andy Stevens [mailto:insomniacpeng...@googlemail.com] >Gesendet: Dienstag, 8. September 2009 08:42 >An: user >Betreff: calculating relative paths > >Hi, > >Is there an easy way to calculate an arbitrary relati

Re: calculating relative paths

2009-09-08 Thread Francis GALIEGUE
On Tue, Sep 8, 2009 at 08:41, Andy Stevens wrote: > Hi, > > Is there an easy way to calculate an arbitrary relative path between two > files? > Part of my Ant script copies a default configuration file to a build > folder, in the course of which I modify it (with xmltask) with the > location of so

calculating relative paths

2009-09-07 Thread Andy Stevens
Hi, Is there an easy way to calculate an arbitrary relative path between two files? Part of my Ant script copies a default configuration file to a build folder, in the course of which I modify it (with xmltask) with the location of some source files. At the moment I'm using to get the absolute p