vl-file-directory-p (AutoLISP)

Determines if a file name refers to a directory

Supported Platforms: Windows and Mac OS

Signature

(vl-file-directory-p filename)
filename

Type: String

File name. If you do not specify a full path name, vl-file-directory-p searches only the AutoCAD default drawing directory.

Return Values

Type: T or nil

T, if filename is the name of a directory; nil if it is not.

Examples

Windows
(vl-file-directory-p "sample")
T

(vl-file-directory-p "yinyang")
nil

(vl-file-directory-p "c:/My Documents")
T

(vl-file-directory-p "c:/My Documents/lisp/yinyang.lsp")
nil
Mac OS
(vl-file-directory-p "support")
T

(vl-file-directory-p "xyz")
nil

(vl-file-directory-p "/documents")
T

(vl-file-directory-p "/documents/output.txt")
nil