file /Utilities

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


file f;
// Open the file in 'read' mode. Use "w" for writing
string fileName = GetExternalStorageDirectory() + "file.txt";
if (, "r") >= 0)
    // Read the whole file into the string buffer
    string str;
    f.readString(f.getSize(), str);