format

Availability All terminals
Description This function deletes all files on the FLASH disk
Syntax void format( void );
Arguments None
Returns None
Remarks All files in the FLASH disk will be cleared. Data in these files will be permanently lost!
Example
#include <stdio.h>
#include <stdlib.h>
#include "lib.h"

void main( void )
{
    static char data[20+1];
    FILE *fp;

    for(;;)
    {
        printf("nf1: mem = %lu", CoreLeft());
        if( NULL != ( fp = fopen("TEST.DAT", "wb")))
        {
            fwrite( data, 1, 20, fp);
            fclose(fp);
        }

        while( getchar() == EOF )
            Idle();

        printf("\n2: mem = %lu", CoreLeft());
        format();

        while( getchar() == EOF )
            Idle();

        printf("\n3: mem = %lu", CoreLeft());
        while( getchar() == EOF )
            Idle();
    }
}