[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [spr7699] How do I tell if a file is a plain file or a directory?



|  .> (probe-file "/tmp/subdir")
|  #p"/tmp/subdir"
|  .> (probe-file "/tmp/subdir/")
|  #p"/tmp/subdir/"
|  .> (probe-file "/tmp/foo.lisp")
|  #p"/tmp/foo.lisp"
|  .> (probe-file "/tmp/foo.lisp/")
|  #p"/tmp/foo.lisp/"                <- NIL seems more sensible

Our reading of the language spec indicates that there is no
implementation-independent way of making this distinction.  We tend to
use the function, excl::probe-file-non-directory, for this purpose,
but of course it is as unportable as your solution.

---------------------------------------------------------------
George Jacob                      Internet: georgej@franz.com
Franz Inc.,                       uucp:     uunet!franz!georgej
1995 University Avenue,           Phone:    (510) 548-3600
Berkeley, CA 94704.               FAX:      (510) 548-8253
---------------------------------------------------------------