4.42 _sys_flen()

Defined in rt_sys.h, the _sys_flen() function returns the current length of a file.

Syntax

long _sys_flen(FILEHANDLE fh);

Usage

This function is used by _sys_seek() to convert an offset relative to the end of a file into an offset relative to the beginning of the file.

You do not have to define _sys_flen() if you do not intend to use fseek().

If you retarget at system _sys_*() level, you must supply _sys_flen(), even if the underlying system directly supports seeking relative to the end of a file.

Returns

This function returns the current length of the file fh, or a negative error indicator.

Non-ConfidentialPDF file icon PDF versionARM DUI0475M
Copyright © 2010-2016 ARM Limited or its affiliates. All rights reserved.