int f_seteof( F_FILE *pxFileHandle );
Truncates a file to the current file read/write position. All data after
the current read/write position is lost.
The handle of the file being truncated. The handle is
returned by the call to f_open() originally used to
open the file.
The file was successfully truncated.
Any other value
The file was not successfully truncated. The returned
value holds the error code.
void vSampleFunction( char *pcFileName, long lTruncatePosition )
pxFile = f_open( pcFileName, "r+" );
f_seek( pxFile, lTruncatePosition, F_SEEK_SET );
if( f_seteof( pxFile ) != F_NO_ERROR )
f_close( pxFile );
Example use of the f_seteof() API function
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.