How to check if a directory is empty?
807589Nov 6 2008 — edited Nov 6 2008Hi All,
I have to change a code which deletes a list of files. Now as an enhancement I need to add a feature that if all the files of some folder have been removed, then I will have to remove the directory too. I am currently unable to find a way to check if the directory is empty or not.
Please help. Thanks.