newLISP Fan Club

Forum => newLISP and the O.S. => Topic started by: linli on September 28, 2009, 05:38:45 AM

Title: A suggestion
Post by: linli on September 28, 2009, 05:38:45 AM
I just noticed that when I do (directory? "c:"), I got nil. Should it return true instead? The drive can be considered as the "root" directory on that drive.
Title:
Post by: HPW on September 28, 2009, 05:46:20 AM
How about:

> (directory? "C:\.")
true
> (directory? "C:.")
true
> (directory? "C:.")
true
Title:
Post by: newdep on September 28, 2009, 05:49:10 AM
what newlisp version are you using ?



because I get true out of this ->



>(directory? {c:})

true



the "c:" gives an error..
Title:
Post by: linli on September 28, 2009, 06:44:52 AM
I am using 10.1.5.

(directory? "c:\") => nil

(directory? "c:\\") =>true
Title:
Post by: newBert on September 28, 2009, 07:50:31 AM
For me on Win XP with NewLISP 10.1.5 :


QuotenewLISP v.10.1.5 on Win32 IPv4, execute 'newlisp -h' for more info.



> (directory? "c:")



ERR: string token too long : "c:")rn"

> (directory? "c:\")

nil

> (directory? {c:})

nil

> (directory? {c:\})

true

>


and :


Quote> (directory? "c:/")

nil

> (directory? "")



ERR: string token too long : "")rn"

> (directory? "\")

nil

> (directory? "\.")

true

> (directory? "/.")

true

>