1
votes

CLIPS has function "(open)" used for opening files. If file can be opened this function returns "true". Is there a similar function for opening directories? I want to check that path to the directory (saved in the string variable) is correct.

1

1 Answers

0
votes

There is not a similar function for opening directories. You would have to add one to the CLIPS source code using the user-defined function API described in the CLIPS Advanced Programming Guide. I couldn't find any references for a relevant library function in ANSI C, so you'd have to check for the appropriate function for whichever platform you're using:

How can I check if a directory exists?

C faster way to check if a directory exists