Shred Function Qt C++ on windows
So, I searched for such a function and, I did find some things on O-Stack, but I rewrote what I found because it didn't actually work, I tested this function and it works pretty well, I think it has room for improvement as usual but I thought to share it anyway.
So here it is:
bool QtClAct::shred(const QString & fileName, uint RepeatWrite, bool DeleteFileLink) { if(RepeatWrite < 1) RepeatWrite = 1; QSaveFile file(fileName); QFileInfo fi(file.fileName()); for(int i=0; i < RepeatWrite; i++)...
View full article