Whole document tree

Whole document tree

C++ Programming HOW-TO: File Class Next Previous Contents

8. File Class

C++ and Java is often used concurrently in many software projects. Programmers jump back and forth between C++ and Java will find this File class very helpful.

You would use the File class to manipulate the operating system files. This class is an imitation of Java's File class and will be very useful in C++ programming. Using this File class in C++ you can do if file exists() ?, if directory exists() ?, file length() and other functions.

Note that these classes has some great functionality not supported in The Standard C++ Library, but don't confuse them with fstreams(iostreams), which is the way you should perform many other operations on files.

Next Previous Contents