ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mariusz Nowostawski <>
Subject Re: Path & dir separators (was Re: Ant Principles)
Date Wed, 19 Apr 2000 22:03:16 GMT
> > So for the most complex situation we would get (assuming the OS name
> > issue has been resolved):
> > 
> >   <copydir>
> >     <src>
> >       <path definition="c:\foo\bar"
> >           os="win" dirseparator="\" pathseparator=";"/>
> >       <path definition="/usr/local/foo/bar"
> >           os="unix" dirseparator="/" pathseparator=":"/>
> >     </src>
> >     <dest>
> >       <path definition="d:\xyz"
> >           os="win" dirseparator="\" pathseparator=";"/>
> >       <path definition="/home/xyz"
> >           os="unix" dirseparator="/" pathseparator=":"/>
> >     </dest>
> >   </copydir>
> > 
> > Is this all correct?
> sounds correct to me...  

sounds all right to me as well. 
However, it is not appealing to me to type 
   dirseparator="\" pathseparator=";"    and 
   dirseparator="/" pathseparator=":"    and
     others ....
all over again in milions of places.

_If_ the OS name issue has been resolved, the OS could have associated
default separators and it could be more compact to use:

     <path os="win" definition="c:\foo\bar" />
     <path os="unix" definition="/usr/local/foo/bar" />

Thus "os" could be really not an indication of OS, but indication of the
family of conventions for filesystem path expressions, i.e. unix-like,
windows-like, macos-like, vms-like, etc.  Each OS has than associated
filesystem path expression convention, and linux-solaris, linux-i686, and
hpux for example are all using unix-like filesystem path expression
conventions. With some luck ;o) we would need to define only some
mappings (say windows, mac, vms), and for "unknown" assume unix-like
Could be done in the property definition or in some standard property file
for ant. Would be nice also to define default convention for build file,
to skip reapeating for example 
all over again, for relative paths for example.

how it sounds?

best regards

View raw message