Keil Logo

_sys_flen()

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 DUI0378H
Copyright © 2007, 2008, 2011, 2012, 2014-2016 ARM. All rights reserved. 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.