Creating an absolute path filename via join on directory and filename
[1/6] from: princepawn::lycos::com at: 28-Aug-2000 6:21
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
[2/6] from: anton:globalcenter:au at: 29-Aug-2000 2:41
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:
[3/6] 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:
<<quoted lines omitted: 26>>
> > 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}
[4/6] from: galtbarber:mailandnews at: 28-Aug-2000 15:54
Shouldn't they return the same thing on Rebol?
It seems like they should.
Is this a bug?
I think RT still have some philosophy stuff to work out
regarding platform issues, meaning of to binary! and
sharing objects created on one system with another system...
Even if it is cool for Unix wizards to have whatever this
info is, it will be a drag for them if they write a script
using that info and expecting it to work everywhere...
-Galt
>===== Original Message From [joel--neely--fedex--com] >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
<<quoted lines omitted: 11>>
>>> foo: read %java
>==
{^@H^@^@^@^@^[A^@\^@^G^@^@classes^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@
>^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^...
>>> foo: read %java/
<<quoted lines omitted: 12>>
>> 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!
[5/6] from: allen:rebolforces at: 29-Aug-2000 9:15
There is a new function in core 2.3 which makes thing easier when dealing
with dirs that may not have "/" on the end
? dirize
USAGE:
DIRIZE path
DESCRIPTION:
Returns a copy of the path turned into a directory.
DIRIZE is a function value.
ARGUMENTS:
path -- (Type: file string url)
e.g.
foo: read dirize %Examples
Cheers,
Allen K
[6/6] from: bhandley:zip:au at: 29-Aug-2000 18:53
> Shouldn't they return the same thing on Rebol?
> It seems like they should.
>
> Is this a bug?
>
I doubt it. What would be the point of such information? It it is clearly
platform specific information. With my Rebol hammer, I'm seeing most
problems as nails, but is this going a little far?
[snip something I can't comment on.]
> Even if it is cool for Unix wizards to have whatever this
> info is, it will be a drag for them if they write a script
> using that info and expecting it to work everywhere...
I don't know what info is there, but I can guess, so I suspect that it may
even be a drag to expect that the information would work even on the same
platform at a later time. It may be that the result on Windows may be the
better behaviour - don't know really.
Brett.
> -Galt
>
> >===== Original Message From [joel--neely--fedex--com] > >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:
<<quoted lines omitted: 4>>
> >>> 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...
> >>>
<<quoted lines omitted: 3>>
> >>> foo: read %java
> >>
{^@H^@^@^@^@^[A^@\^@^G^@^@classes^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^
@
Notes
- Quoted lines have been omitted from some messages.
View the message alone to see the lines that have been omitted