Leon Breedt wrote:

> is there a function similar to pascal's filesize() in ANSI C?  something
> that will take a pointer to a stream as parameter, and return the file
> size in bytes.

No. POSIX defines stat() and fstat(), which return the size, plus
various other details. Note that streams (or descriptors) don't
necessarily correspond to a file. They could equally refer to a pipe
or socket, which don't have a size.

Also, on a multitasking OS, the size could have changed by the time
that stat() etc return, if another program is writing to the file.

-- 
Glynn Clements <[EMAIL PROTECTED]>

Reply via email to