.FOpen()

back to FEHSD

Description

The function is used to open a file for reading or writing on the microSD card. Once this is called, FPrintf, Fscanf, Feof can be used. If FOpen is called, FClose must also be called.

Syntax

.FOpen(const char* str, const char* mode);

Parameters

str: Filename
mode: string containing a file access mode.

Returns

Pointer to FEHFile which can be used for the other FEHSD member functions

Examples

#include <FEHSD.h> 
int main(void) {
    //Open new file for reading
    FEHFile *fptr = SD.FOpen("Test.txt","r");
    //Close the file
    SD.FClose(fptr);
}