std-filename-split | ![]() |
std-filename-split splits all components of a partial or full pathname specifier into a list of its components:
1) the path, including a driveletter and colon,
2) the filename,
3) the extension including the dot.
There is no case conversion done. Supported platforms are Dos, Windows, Unix and OS/2.
Paths are processed with std-fpslash, but drive names only not. So there's no trailing slash forced with "<drive-letter>:" only.
The file does not need to exist actually, so there may arise problems with directories containing a dot and other ambiguities. It does not call findfile.
For details see below:
(std-filename-split "d:/acad") => ("d:\\acad\\" "" "") (std-filename-split "d:acad") => ("d:" "acad" "") (std-filename-split "d:/acad/test")
=> ("d:\\acad\\" "test" "") (std-filename-split "d:/acad/test.lsp")
=> ("d:\\acad\\" "test" ".lsp") (std-filename-split "d:/acad/test.lsp/test.lsp")
=> ("d:\\acad\\test.lsp\\" "test" ".lsp")
Note
There exists an undocumented R14 AutoLISP function fnsplitl which is similar to std-filename-split.
fname: a string. A partial or fully qualified filename specifier.
A list of strings.
See std-fpslash.
(std-require 'STDFILE)
Defined in STDFILE