+ -
当前位置:首页 → 问答吧 → CFile到底有没有Buffer?

CFile到底有没有Buffer?

时间:2011-12-05

来源:互联网

关于CFile,MSDN上第一句就是
It directly provides unbuffered, binary disk input/output services, and it indirectly supports text files and memory files through its derived classes. 

然后关于CFile::Flush这个函数的描述是:
Forces any data remaining in the file buffer to be written to the file.

前面说它没有buffer,后面那个Flush又说是强制把buffer里面的东西写到文件。
这是不是矛盾?CFile到底 有没有Buffer?

还有,有时间的大侠顺便帮忙看看这两个贴子吧,谢谢:
http://topic.csdn.net/u/20111205/15/e5841246-eb2b-43c7-8f99-b2db1c04f195.html
http://topic.csdn.net/u/20111205/16/0439070c-8329-45ca-8db5-8d4725049601.html

作者: ereere235   发布时间: 2011-12-05

直接支持无buffer的二进制服务,间接支持文本文件和内存文件,所以有无BUFFER都支持。

作者: Kaile   发布时间: 2011-12-05

引用 1 楼 kaile 的回复:

直接支持无buffer的二进制服务,间接支持文本文件和内存文件,所以有无BUFFER都支持。

没看太懂, 意思是二进制的没有buffer ?
而文本文件有?

作者: ereere235   发布时间: 2011-12-05