delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/11/01/10:36:28

From: "John M. Aldrich" <fighteer AT cs DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: HELP! How do i return the size of a file in DJGPP C
Date: Thu, 30 Oct 1997 11:02:17 +0000
Organization: Two pounds of chaos and a pinch of salt
Lines: 18
Message-ID: <34586939.819@cs.com>
References: <637u61$qqb$2 AT madrid DOT visi DOT net>
Reply-To: fighteer AT cs DOT com
NNTP-Posting-Host: ppp245.cs.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

kris Mills wrote:
> 
> I was woundering how you return the size of a file in DJGPP C.

    FILE *fp;
    fp = fopen( "filename.ext", "r" );
    printf( "Size of filename.ext:  %ld\n", filelength( fileno( fp ) )
);

In other words, look it up.

-- 
---------------------------------------------------------------------
|      John M. Aldrich       | "History does not record anywhere at |
|       aka Fighteer I       | any time a religion that has any     |
|   mailto:fighteer AT cs DOT com   | rational basis."                     |
| http://www.cs.com/fighteer |                - Lazarus Long        |
---------------------------------------------------------------------

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019