[plt-scheme] parsing windows path on linux?
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
bytes->string/utf-8.
Are there thoughts to allow all path functions to manipulate the different
path types? It seems the differences between these path types are not
great.
Thanks,
yc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20090110/120b7094/attachment.html>