[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Determining whether a UN*X pathname is a directory
From: lgm@iexist.att.com
Date: Wed, 20 Nov 1991 16:55-0600
I need a way to tell whether a given SunOS pathname such as
"al:/u/lgm/dir" represents a directory or an ordinary file. (Note that
we only use FTP, not NFS, between Symbolics and Suns.) PATHNAME-TYPE
only looks at the portion of the name after the last dot (if any), which
on SunOS has no connection with whether a pathname represents a
directory. I tried invoking PROBE-FILE on the extended pathname
"al:/u/lgm/dir/.", whose presence would effectively tell me what I need
to know, but PROBE-FILE seems to go into an infinite loop with that
argument. Any suggestions?
I think this should work:
(getf (cdr (fs:file-properties <pathname>)) :directory)