Hi everyone!
Here is a silly question!
The mkdir function:
int mkdir (const char *filename, mode_t mode)
has the following errnos:
EACCES, EEXIST, EMLINK, etc....
How can I find which one of these errors occurred when mkdir() function fails?
Code:int status = mkdir( "project1/testdir", (S_IRWXU | S_IRWXG | S_IRWXO) ) if(status == 0) printf("success"); else { printf("error"); // find which error occurred??? }