PDA

View Full Version : directory and files



rmagro
15th September 2008, 09:00
Hi all,

How can I check with Qt if a directory has files and in that case delete all those files ?
I am using Qt 4..

Thank you in advance for your kind reply and suggestions..

Roberto

aamer4yu
15th September 2008, 09:41
You can iterate over a directory using QDir::entryInfoList .
You can then check if each is a file, and if yes, delete it. :)

lyuts
16th September 2008, 13:40
http://doc.trolltech.com/4.4/qdir.html#count