[REBOL] Creating an absolute path filename via join on directory and filename Re
From: joel:neely:fedex at: 28-Aug-2000 11:29
Without the final '/', read attempts to access the directory as an actual
file. On mess-doss this causes an error, while on *nix it returns some
nice binary stuff which only wizards know how to use.
With the final '/', read returns a block of names found within the directory.
For example, in the MICROS~1 world:
>> foo: read %Examples
** Access Error: Cannot open /C/bin/REBOL/Examples.
** Where: foo: read %Examples
>> foo: read %Examples/
== [%all.r %index.html %webprint.r %webget.r %webgetter.r %weblib.r %websend.
r %webfind.r %webfinder.r %webcheck.r %webloop.r %webt...
>>
And in the *nix world:
>> foo: read %java
== {^@H^@^@^@^@^[A^@\^@^G^@^@classes^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@
^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^...
>> foo: read %java/
== [%classes/]
>>
-jn-
[anton--globalcenter--net--au] wrote:
> Hi,
>
> an absolute path is like this:
> %/c/cygwin/
> %/d/games/afile
> etc..
>
> Hope that's what you're after.
> By the way, somebody once said it's better to specify dirs with the '/' on the end.
I forget why...
>
> Anton.
>
> [princepawn--lycos--com] wrote:
>
> > I want to create a configuration file which loads in some functions I wrote. I wrote
a verbose description of the program below, but then figured: "Gee, REBOL is actually
more concise and easy to understand than my English!"
> >
> > REBOL []
> >
> > rebol-dir: "/cygwin/home/administrator/rebol"
> >
> > j: join rebol-dir "/vindex.r"
> >
> > f: to-file j
> >
> > do f
> >
> > so I have two questions:
> >
> > 1- how can i use "c:/cygwin/home/administrator/rebol" instead of just
> > "/cygwin/home/administrator/rebol" so that I can use directories which may be on
any drive?
> >
> > 2- As it stands, this script just hangs even though there is a file called vindex.r
in the created directory path
> >
> > Get your FREE Email and Voicemail at Lycos Communications at
> > http://comm.lycos.com
--
; Joel Neely [joel--neely--fedex--com] 901-263-4460 38017/HKA/9677
REBOL [] print to-string debase/64 decompress #{
789C0BCE0BAB4A7176CA48CAB53448740FABF474F3720BCC
B6F4F574CFC888342AC949CE74B50500E1710C0C24000000}