[plt-scheme] 352.8
At Sun, 22 Oct 2006 10:50:12 +0200, Jens Axel Søgaard wrote:
> > For example, it's not clear what to use under Unix
> > for the Windows root "C:\\" or "\\\\machine\\volume" or
> > "\\?\#^%$#^@\\\\",
>
> Can't they just stay Windows paths? Manipulations like build-path
> and split-paths can be used to tear old Windows paths apart, and
> put new ones together - they can then later on be used on a
> Windows machine? On a Unix-machine open-input-file on could
> raise an exception, when called with a non-convertible
> Windows path.
Yes - that's what I had in mind for direct support in MzScheme.
My impression was that you also needed the paths to somehow access
parts of a Unix filesystem, in which case someone would have to do more
work. If not, then nevermind.
> > what to do with a Unix path element like "a\\b" or a Windows path
> > element "a/b".
>
> How about a parameter convert-seperators-in-paths which when true
> converts between \\ and /, and if false doesn't? The default
> being true, since that is probably most needed?
I think we're talking past each other a bit here. If we've stopped
talking about using Windows paths to access a Unix filesystem, then the
above is moot. If we're still talking about that a little, my intended
point was that "\\" isn't a separator for Unix paths, and "/" isn't
always a separator for Windows paths, so they can appear in element
names (which makes the element name unsuitable on the other platform,
independent of the rest of the path syntax).
Matthew