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

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 ---

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