home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 3621 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.0 KB  |  37 lines

  1. Path: ulke.hiMolde.no!runee
  2. From: runee@hiMolde.no (Rune Espeseth)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: File sizes
  5. Date: 22 Feb 1996 16:33:23 GMT
  6. Organization: Molde College, Department of Computer Science
  7. Message-ID: <4gi5sj$eim@ulke.hiMolde.no>
  8. References: <4gd9pu$cpr@mn5.swip.net>
  9. NNTP-Posting-Host: ulke.himolde.no
  10. X-Newsreader: TIN [version 1.2 PL2]
  11.  
  12. Daniel Hallgren (Ola.Lindgren@mailbox.swipnet.se) wrote:
  13. : What's the best way of finding out the size of a file? Do I have to use 
  14. : Examine() or something? I write in assembler (DevPac 2).
  15.  
  16. Yes. 
  17. In c:
  18.  
  19. struct FileInfoBlock *fibl;    // needs to be longword-aligned
  20.  
  21. filelock=Lock(filename);
  22. fibl=Examine(filelock);
  23. Unlock(filelock);
  24.  
  25. check the fibl.filesize to get the size of the file.
  26.  
  27. Or something along those lines, I don't have the RKM's here at scool... :)
  28.  
  29. --
  30. Regards,
  31. Rune Espeseth
  32.  
  33. -------------
  34. CyberStorm060/50Mhz, CyberVision64/4Mb
  35. Computer Information Science Student at Molde College, Norway
  36. Email: lakris@ask.himolde.no | Rune.Espeseth@himolde.no
  37.