I made a new project that has to open a folder using DIR *DIR * directory=openDir(...); // openDir is a function returning DIR * after it was opened
than to make a new folder in it, so far so goodmkdir(path,permissions);
and now i have to run through the folder entries usingwhile ((ent=readdir(directory))){ do stuff ; }
but it wont get into the loop.
and if i add this code AFTER the previous code it works and i get into the loop
DIR *dirr=openDir(path);// same openDir function from above
while(ent=readdir(dirr)){stuff}
i do get into the while loop.
any ideas?
edit: (another question)
and what can i do in order for the readdir to avoid subdirectories? ( avoiding the new folder i just created in it)