From: "Charles"
> Okay, here's a question regarding the dir? function.
> Here's a little sample code:
>
> root: %/c/somedir/anotherdir/adir/
> sub: %bdir/
> foreach dir read join root sub [
> if (dir? dir) AND (none? find dir "TN-") [
> etcetcetc
> ]
> ]
>
> Problem is, when dir is, in fact, a directory, dir? is returning false.
> I've no idea why, and my only fix around it is to use (dir? rejoin [root
sub
> dir]) .. Shouldn't dir? return true? It has in the past for me in a
similar
> situation... *boggle* Help?
Hi, Charles,
I can more easily offer the fix rather than explain the problem. The short
answer is that REBOL needs the path. Try:
root: %/c/
sub: %rebol/
foreach file read full-path: join root sub [
if dir? join full-path file [print file]
]
(This sample is, of course, changed to something that I could run and show
the results.)
Hope this gets you past the hurdle, but I, too, would like to more fully
understand the distinction.
--Scott Jones
--
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the
subject, without the quotes.