Keil Logo Arm Logo

_sys_flen()

_sys_flen()

Defined in rt_sys.h, this function returns the current length of a file.

Show/hideSyntax

long _sys_flen(FILEHANDLE fh);

Show/hideUsage

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.

Show/hideReturns

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

Show/hideSee also

Reference

Using ARM C and C++ Libraries and Floating-Point Support:

Copyright © 2011-2012 ARM. All rights reserved.ARM DUI 0589B
Non-ConfidentialID062912

Keil logo

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.