ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Haas <thomas.h...@softwired-inc.com>
Subject Re: Path.java update
Date Thu, 08 Jun 2000 11:24:57 GMT


Stefan Bodewig wrote:

> Your attachment has an interesting MIME type
> (application/x-unknown-content-type-visualcafefile.document) haven't
> seen something like this before 8^). Must be Windows I guess.

Yes - an old '95 machine at home. Had Visual Cafe installed once (long,
long time ago). '95 still remembers those days and associates everything
.java with Visual Cafe. Long time ago I should have cleaned up (and
installed Linux) ;-)


> >>>>> "TH" == Thomas Haas <thomas@haas-wyss.ch> writes:
>
>  TH> Simplyfied translatePath method. DOS path detection changes:
>  TH> detection is only done, when PathSeparator is ";". It only checks
>  TH> for the second character being ":".
>
> I'm not sure this is a good thing. First you'd better check for
> PathSeparator being not ':' instead of equals ';'.

Done.


> I've forgotten what VMS uses as a Path separator - too long ago - but
> it does have (logical) drive names separated from the rest of the
> filename by a : - and the drive name was anything but limited to one
> character BTW.
>
> The ; separated the version of a file from the rest of the filename so
> I doubt they would use ; as a separator.
>
> In the common case - i.e. Unix, Windows and Mac - your assumptions are
> correct but there are different beasts out there that could be better
> suited by the older version.

Correct. Path.translatePath does not better than Project.translatePath. To
me the problem can only be solved by customizing things. As you point out,
this may not be worth the effort.


>  TH> * New translateFile method
>
> For completeness? You could simply call translatePath for single
> filenames as well, couldn't you?

translatePath returns a list of Strings, whereas translateFile returns a
single String and does not mess with path separators.


>  TH> we should decide on the translatePath method, as there is another
>  TH> in Project.
>
> Yes, there are some other helper methods that don't really belong into
> Project (copyFile and toBoolean) and Path seems a far more natural
> place for the translate methods.
>
>  TH> May the functionality could be placed in a object of its
>  TH> own. Maybe even in a way to allow people to replace the
>  TH> implementation of translateFile/Path with their own.
>
> Don't think we would gain much from this flexibility. IMHO it's
> overkill but I could live with it.
>
> Stefan

thanks for your comments.
- tom



Mime
View raw message