int ff_seteof( FF_FILE *pxStream );
Truncates a file to the file’s current read/write position. The file
must have previously been opened using ff_fopen()
with the mode string set to “a” or “w”.
The file being truncated.
If the file was successfully truncated then zero is returned.
If the file could not be truncated then FF_EOF is returned and the task’s
errno is set to indicate the reason. A task
can obtain its errno value using the ff_errno()
void vSampleFunction( char *pcFileName, long lTruncatePosition )
pxFile = ff_fopen( pcFileName, “a” );
ff_fseek( pxFile, lTruncatePosition, FF_SEEK_SET );
if( ff_seteof( pxFile ) != FF_EOF )
ff_fclose( pxFile );
Example use of the ff_seteof() API function
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.