File I/O Classes
These classes provide an interface to traditional disk files, in-memory files, Active streams, and Windows sockets. All of the classes derived from CFile can be used with a CArchive object to perform serialization.
Use the following classes, particularly CArchive and CFile, if you write your own input/output processing. Normally you do not need to derive from these classes. If you use the application framework, the default implementations of the Open and Save commands on the File menu will handle file I/O (using class CArchive), as long as you override your document's Serialize function to supply details about how a document serializes its contents. For more information about the file classes and serialization, see the article Files in MFC and the article Serialization.