REBOL 3.0

File paths for windows servers

Carl Sassenrath, CTO
REBOL Technologies
21-Jul-2009 17:54 GMT

Article #0225
Main page || Index || Prior Article [0224] || Next Article [0226] || 8 Comments || Send feedback

Ok, time to chat about this, as BrianH has posted bug#1115.

We need to be able to easily access Windows file servers from Windows systems. The to-local-file function wasn't converting file paths properly, and it has been modified for the next release.

Here is the test pattern for it:

[""       = to-local-file %""]
["\"      = to-local-file %/]
["\"      = to-local-file %//]
["c:\"    = to-local-file %/c]
["c:\"    = to-local-file %/c/]
["c:\d"   = to-local-file %/c/d]
["c:\d\"  = to-local-file %/c/d/]
["\\host" = to-local-file %/host]
["\\host\" = to-local-file %/host/]
["\\host\d" = to-local-file %/host/d]
["\dir"   = to-local-file %//dir]
["\dir\d" = to-local-file %//dir/d]

This should be consistent with R2. Of course, note that single character root names are expected to be drive letters and convert to the ":" format. I don't think there's much we can do about that (remember, we really try to stay OS-independent when possible.)

We will want to do a similar conversion for file URLs, but allow an extra slash.

Post your inputs because this will be frozen soon.

8 Comments

REBOL 3.0
Updated 23-Nov-2024 - Edit - Copyright REBOL Technologies - REBOL.net