[plt-scheme] parsing windows path on linux?

From: YC (yinso.chen at gmail.com)
Date: Sun Jan 11 02:15:24 EST 2009

On Sat, Jan 10, 2009 at 8:14 PM, Eli Barzilay <eli at barzilay.org> wrote:

> It looks like the reason for this is that a non-default-platform path
> is not considered as a path in the `path?' sense -- so you get an
> error.  But you can use `split-path' directly (which is what
> `file-name-from-path' is doing):
> (let-values ([(base file dir?)
>              (split-path (bytes->path #"c:\\foo\\bar.txt" 'windows))])
>  file)

Thanks for the tip, Eli.

It seems that windows-path cannot be directly manipulated except through a
few path functions.  It took me a while to figure out how to convert
windows-path back to string: first use path->bytes and then

Are there thoughts to allow all path functions to manipulate the different
path types?  It seems the differences between these path types are not

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20090110/120b7094/attachment.html>

Posted on the users mailing list.