Hi there
I often use the "compare directories" function to verify burned CDs and to check backups and so on. But sometimes the comparison is done very quickly even on larger files. E.g. if I burn 2 CDs with same content (2 Backups for archive) or if I copy the data via network to another PC, the compare tool does not read from disk or CD again, it reads from the cache.
So I'm not sure if the file really can be read from disk again and its content is correct, right? I assume windows cache management does its work here, but is there a way that ServantSalamander can read data without using the cache for content comparison?
Kind regards,
Marcel
Compare files by content (binary) - disk cache
-
- ALTAP Staff
- Posts: 5231
- Joined: 08 Dec 2005, 06:34
- Location: Novy Bor, Czech Republic
- Contact:
-
- ALTAP Staff
- Posts: 132
- Joined: 07 Dec 2005, 23:01
- Location: Prague, Czech Republic
- Contact:
I don't know if there is a "unbuffered reader", but most C++ have the possibility to clear the stream buffer. But I'm not sure if this affects windows disk or file cache.
streambuf::sync
Here a link to this function in Microsoft Visual C++ 6.0 on the MSDN:
http://msdn.microsoft.com/library/defau ... a.sync.asp
streambuf::sync
Here a link to this function in Microsoft Visual C++ 6.0 on the MSDN:
http://msdn.microsoft.com/library/defau ... a.sync.asp
Streambuf is higher level function. Really low level API is: FlushFileBuffers or CreateFile with FILE_FLAG_NO_BUFFERING. BUT, both of them affects writing only. For compare it's necessary to invalidate disk read cache - but it is not possible under MS Windows (or not known to me - i.e. it's not in base API).Marcel_G wrote:I don't know if there is a "unbuffered reader", but most C++ have the possibility to clear the stream buffer. But I'm not sure if this affects windows disk or file cache.
streambuf::sync
Here a link to this function in Microsoft Visual C++ 6.0 on the MSDN:
http://msdn.microsoft.com/library/defau ... a.sync.asp
-
- ALTAP Staff
- Posts: 5231
- Joined: 08 Dec 2005, 06:34
- Location: Novy Bor, Czech Republic
- Contact: