Copy of large files and QFileSystemWatcher under windows
-
@VRonin so my test is not really correct, I have now read that too in the documentation. because my test is :
if (currentsize&¤tsize==oldsize&&f.open(QIODevice::ReadOnly))//(and currentsize=f.size();)
@VRonin it is ok with this test but not perfect, I suppose currentsize=0 and f.open returns false so long the copy is not finished
-
I would use:
bool check = f.open(QIODevice::ReadOnly); check = check && currentsize==oldsize if(check)@VRonin I have made several tests with your condition :
bool check = f.open(QIODevice::ReadOnly); currentsize=f.size(); check = check && currentsize==oldsize if(check)and it is ok (for small files and larges files).so thanks I will keep it....