std-findfile-exts


Synopsis

(std-findfile-exts <fspec> <ext-lst> <path-lst>)

Description

std-findfile-exts searches for the filename with the given extensions in all directories of the argument path-lst which is normally the AutoCAD library search path.

It searches in each directory for the all extensions. It uses findfile wildcards and not wcmatch wildcards.

If fspec contains an absolute path it searches only in this path and ignores the path-lst argument.

Examples

(std-findfile-exts "LIS*.TST"
'("FAS" "LSP")
(std-acad-library-paths))

=> returns the first found FAS or LSP file, the extension .TST is ignored.

(std-findfile-exts "/LISP/LIS*.TST" '("FAS" "LSP") nil)
=> returns the first found FAS or LSP file in the directory /LISP only.

Arguments

fspec: a filename specifier which might include wildcards and a path.

ext-lst: a list of extensions which might include a leading dot or not.

path-lst: a list of paths, with or without ending slash.

Return Value

The first found matching filename.

Side Effects

None.

Module

(std-require 'STDFILE)

Defined in STDFILE