Object type that identifies a File stream and contains the information needed to control it, including its position indicator and all its state indicators.
file
objects are usually created by the file::open
method.
This object encapsulates the FILE
object from the standard C library.
The description above has been adapted from the FILE reference page on cplusplus.com.
Example:
file f; // Open the file in 'read' mode. Use "w" for writing string fileName = GetExternalStorageDirectory() + "file.txt"; if (f.open(fileName, "r") >= 0) { // Read the whole file into the string buffer string str; f.readString(f.getSize(), str); f.close(); }