_filelength is a WinNT and Win9x compatible function which
returns the length of a file. GetFileSize is a Windows API
function which returns the size of a file. Is there an
ANSI-compatible function which does the same thing?
Travis Hall
Printable View
_filelength is a WinNT and Win9x compatible function which
returns the length of a file. GetFileSize is a Windows API
function which returns the size of a file. Is there an
ANSI-compatible function which does the same thing?
Travis Hall
ANSI C doesn't define an equivalent function. The problem is that the
concept of a file is platform specific. On some OS's, a terminal, a
keyboard and a modem are all files. Trying to take their size doesn't
make sense. Therefore, this function is not universally supported.
Danny Kalev
"The ANSI/ISO C++ Professional Programmer's Handbook"
http://www.amazon.com/exec/obidos/ASIN/0789720221
Please reply to the newsgroup.
Travis Hall wrote:
>
> _filelength is a WinNT and Win9x compatible function which
> returns the length of a file. GetFileSize is a Windows API
> function which returns the size of a file. Is there an
> ANSI-compatible function which does the same thing?
>
> Travis Hall
Danny Kalev <dannykk@inter.net.il> wrote:
[regarding ANSI file size function]
>ANSI C doesn't define an equivalent function. The problem is that the
>concept of a file is platform specific. On some OS's, a terminal, a
>keyboard and a modem are all files. Trying to take their size doesn't
>make sense. Therefore, this function is not universally supported.
I figured that would be the case. Doesn't hurt to ask, though.
Thanks.