How can we find whether the folder is empty or not ??
Is there a single function for it, provided by c++ library ??
Hi,
U can use the function FindFirstFile( ); which will try to find the first file present in the given folder n if the folder is empty then this function will fail.
No folder is empty every folder always contains the directories
.
..
that is dot and dot dot representing the current folder and the folder 1 level down in the directory structure. remembering that directories are just a special type of file.
You may be able to tell FindFirstFile to ignore directory files or you may have to read the contents of the directory and ignore these 2 entries.
Comment