header_file.h
unsigned char f_flush( F_FILE *pxFileHandle );
Ensure all the data that has been altered in a FAT file is comitted to the
disk.
Parameters:
pxFileHandle
|
The handle of the file being flushed. The handle is
returned by the call to f_open() used to originally open
the file.
|
Returns:
F_NO_ERROR
|
All data associated with the file was comitted to the
disk.
|
Any other value
|
The file could not be flushed. The return value holds
the error code.
|
See also
f_read(), f_write(), f_open(), f_close().
Example usage:
void vSampleFunction( void )
{
F_FILE *pxFile;
char *pcString = "ABC";
pxFile = f_open( "afile.bin","w" );
if( pxFile != NULL )
{
f_write( pcString, strlen( pcString ), 1, pxFile );
f_flush( pxFile );
}
}
Example use of the f_flush() API function
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.