I am trying to delete a directory I keep getting an error saying that the directory is not empty and can not be delete. I want to put an error check into my code to check if the directory is empty or not but the problem is that i do not know how to write something like this. If somebody can give me a couple of pointers or a genral how to that would be awesome