in reply to Re^2: directory exists
in thread directory exists

Yup. Underneath it calls stat(2), which would return ENOENT if it doesn't exist (file or directory). -d goes on to use the returned struct stat* to check if it's a directory or not.

--
We're looking for people in ATL