PDA

View Full Version : how to remove folders in qt



iswaryasenthilkumar
16th March 2015, 13:57
am having folder name Remote inside that folder am having another one folder. i need to delete Remote folder entirely.. i used QDir::rmdir method ,,its deleting only if the folder is empty..its not deleting if the folder contains subfolders,,can any one give me suggestion for this:confused:
Thanks in advance:o

wysota
16th March 2015, 13:58
Make subdirectories empty before deleting them. Apply the algorithm recursively.

Lesiok
16th March 2015, 13:59
First delete the contents of the folder.

anda_skoa
16th March 2015, 14:06
If this is folder is a temporary location, you could use QTemporaryDir instead and let it handle the cleanup.

Cheers,
_