header_file.h
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.
Parameters:
pxFileHandle
|
The handle of the file being truncated. The handle is
returned by the call to f_open() originally used to
open the file.
|
Returns:
F_NO_ERROR
|
The file was successfully truncated.
|
Any other value
|
The file was not successfully truncated. The returned
value holds the error code.
|
See also
f_truncate
Example usage:
void vSampleFunction( char *pcFileName, long lTruncatePosition )
{
F_FILE *pxFile;
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.