How To Force Files to Be Flushed to Disk (148505)
The information in this article applies to:
- Microsoft Visual C++ 1.0
- Microsoft Visual C++ 1.5
- Microsoft Visual C++ 1.51
- Microsoft Visual C++ 1.52
- Microsoft Visual C++ 2.0
- Microsoft Visual C++ 2.1
- Microsoft Visual C++ 2.2
- Microsoft Visual C++ 4.0
This article was previously published under Q148505 SUMMARY
C and C++ file operations, by default, perform their own data caching. This
caching is in addition to the disk caching done by the operating system.
Under certain conditions it may be necessary to ensure your data is fully
flushed to the disk. This article explains how to ensure that your data is
properly flushed to the disk.
REFERENCES
See the documentation for fflush(), _commit(), _fileno(), and ofstream.
Modification Type: | Minor | Last Reviewed: | 7/1/2004 |
---|
Keywords: | kbcode kbCRT kbhowto KB148505 |
---|
|