[plt-scheme] parsing windows path on linux?

From: YC (yinso.chen at gmail.com)
Date: Sat Jan 10 22:58:27 EST 2009

Hi all -

I try to parse windows path on linux with `file-name-from-path`, but while
it works fine on windows, it doens't parse on Linux.

;; Windows
Welcome to DrScheme, version 4.0 [3m].
Language: Module; memory limit: 128 megabytes.
> (file-name-from-path "c:\\documents and settings\\test\\my file.txt")
#<path:my file.txt>

;; Linux
Welcome to MzScheme v4.1.3 [3m], Copyright (c) 2004-2008 PLT Scheme Inc.
>> (file-name-from-path "c:\\documents and settings\\test\\my file.txt")
#<path:c:\documents and settings\test\my file.txt>

I tried to use bytes->path to generate a `windows-path`, but
`file-name-from-path` doesn't appear to work with `windows-path`.

This need comes out of IE sending a full path with file upload, so I need to
parse out the file name of the path on the web server on Linux.

What would be the best way to achieve this goal?

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

Posted on the users mailing list.