Answer the question
In order to leave comments, you need to log in
How to determine that a file is fully downloaded via torrent?
There is a program in C ++, which checks the integrity of files by the size of the files, and if it is violated, then downloads the files via torrent. If you do not interrupt the download, then everything works fine. But if it is interrupted, then as a result, strange files will appear on the disk, which in the properties have a full size, but "on the disk" is only the part that managed to boot. The files are not fully loaded, the program does not work, but the check shows that all the files are in order, because boost::filesystem::file_size(file_path) gives a normal size. How to know the real size?
This is how one of the files that was created by the torrent looks like and has a normal size, but "on disk" is 0.
Answer the question
In order to leave comments, you need to log in
You have encountered sparsed files. Here's how to determine their actual size
https://msdn.microsoft.com/en-us/library/windows/d...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question