I went looking for a way to find out if a directory existed, and ended
up using file-exists-p. Looking at the elisp manual, however, did not
make it clear whether this was the correct approach or whether it was
"working by accident." In particular, the elisp manual description of
file-exists-p was not really clear whether (or how) this function
would (or should) work for directories, sym-links, etc. While it
seems to basically "do the right thing", I suggest that the
documentation needs to be a bit more explicit about notions of
"generalized" files and how the file-handling functions apply.
The docstring for file-exists-p was not much use in this regard,
although it's link to file-attributes is what led me to suspect that
file-exists-p might be the correct approach for directories as well.
That's a rather indirect hint, however.