Thanks for the relevant pointers in the manual, however, there seems to be some confusion between which would be the best method.
One person in the annotated manual commented that the file_exists() function will accomplish this task, however, there is still the is_dir() function, and in the manual no mention of using it for the purpose I described. To do so would require first it seems the ability to determine if the file exists before finding out if it is a directory. Wouldn't the is_dir() function require the file_exists function to prevent errors if the directory did not exist?
The manual did not state clearly whether the file_exists function worked for directories, there was only a mention of this from user comments. Of course to me that begs the question, might there be problems with using the file_exists() function in the way that I have described for directories since it was designed for files, or does it simply not matter?