HI there,
I a have written a console application that mimics the windows file / folder search application that comes with all windows installations. I am using a recursive function that searches all files and folders in the tree structure and I am using the readdir() function at each level. Some code below:-
pDir = opendir(pFolderPath);
// search for files
while ( (pEntry = readdir(pDir)) != NULL )
{
// more code here
}
pFolderPath must be a valid folder path like c:\temp\fred, etc
Question. How can I search the root directory ? ie How can I pass simply "c:\" to my routine ? Clearly opendir(c:\) will return NULL
THanks all,
bigSteve