[Qt-interest] how to destroy a dir, no matter if any files in it or not.
Nikos Chantziaras
realnc at arcor.de
Tue Mar 23 19:09:15 CET 2010
On 03/23/2010 07:49 PM, James Yan wrote:
> is any handy API do this?
QDirIterator. Without thinking too much about it*: to recursively
delete a directory, you can write a recursive function that calls itself
if QDirIterator::fileInfo().isDir() is true and otherwise deletes the
current file and then calls QDirIterator::next().
* Meaning there could be a better and safer way to do this.
More information about the Qt-interest-old
mailing list