lstat

Test for directory existence in C

I have a function that should create a directory. I want to test to make sure that the directory is created, and has the correct permissions I can't use lstat since I get EPERM when I do so (I assume I'm not supposed to know that much about a directory). So what else should I use? I can try to open it it with opendir, but that doe...