Because the file system is associated with the operating system, and the APIs on Windows and unix platforms are quite different. Therefore, file operations have always been a headache for c ++ programmers who develop platforms.
Although the <iostream> library of STL provides simple file operations (only for file creation and deletion), it is far from meeting our needs. Therefore, the boost. filesystem Library provides a cross-platform file library to facilitate development by programmers.
Note: boost. filesystem has been incorporated into TR2. Although it has not been formally standardized, It is supported in vc11 and gcc and can be used directly. The corresponding namespace is std: tr2: sys.
IBM has written an article about Boost Filesystem Library, so I will not discuss it here. For detailed descriptions of each function, see the msdn document.