>The stat() or fstat() functions should return the correct results of the
real
>size of the file.  In the standard fields, they should have the highest
>byte written in the file.

The CRTL manual notes:

'be aware that for st_size to report a correct value, you need to flush
both the C RTL and RMS buffers'.

fflush()/ fsync() may be a mite quicker than fclose() / fopen() I suppose.

Richard Brodie

PLEASE READ THIS IMPORTANT ETIQUETTE MESSAGE BEFORE POSTING:

http://www.catb.org/~esr/faqs/smart-questions.html

Reply via email to