DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: ANSI-compatible equivalent of _filelength

  1. #1
    Travis Hall Guest

    ANSI-compatible equivalent of _filelength


    _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

  2. #2
    Danny Kalev Guest

    Re: ANSI-compatible equivalent of _filelength

    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


  3. #3
    Travis Hall Guest

    Re: ANSI-compatible equivalent of _filelength


    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center