Logo Search packages:      
Sourcecode: qcomicbook version File versions  Download package

void ImgDirSink::removeThumbnails ( int  days  )  [static]

Removes old thumbnails.

days thumbnails older than this number will be removed

Definition at line 372 of file imgdirsink.cpp.

        if (days < 1)

        const QDateTime currdate = QDateTime::currentDateTime();
        QDir dir(ComicBookSettings::thumbnailsDir(), "*.jpg", QDir::Unsorted, QDir::Files|QDir::NoSymLinks);
        const QStringList files = dir.entryList();
        for (QStringList::const_iterator it = files.begin(); it!=files.end(); it++)
                QFileInfo finfo(dir.absFilePath(*it));
                if (finfo.lastModified().daysTo(currdate) > days)

Generated by  Doxygen 1.6.0   Back to index