FILE SIZE CHECKING FROM C PROGRAM 
Author Message
 FILE SIZE CHECKING FROM C PROGRAM

Quote:

>Hi everyone,
>I am having a C program which creates an output flat file using the
>fprintf function.
>Problem :
>---------
>The file size created by this program should not exceed a particular
>threshold limit.
>Question:
>----------
>How do I check from the C program to check that the file-size has not
>exceeded the threshold limit during the file creation process ?

You are in a much better position than most people who are interested
in file sizes. This problem can be solved without system specific
extentions.

Have a look at the semantics of the return value of fprintf(). The
solution should be obvious. You add up the number of bytes transferred  
to the file, and you get a good rough estimate of the file size, or
even an exact value, if your system does not need any funny tricks
to store text files.

Quote:
>-------------------==== Posted via Deja News ====-----------------------

Wow, an _on_ topic article from Deja News

Kurt

--
| Kurt Watzka                             Phone : +49-89-2180-6254



Tue, 02 Nov 1999 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Newbie: separate big .cs file into small .cs files

2. Check the file size and number symbols in a file using C in Unix

3. HELP - How to check file size in DOS

4. checking file size

5. Checking file sizes

6. resx files needed for cs - files ??

7. CS files display in VS6 like CPP files ?

8. A Program to check ( and ) in a file?

9. Problem #30 on http://cs.nmu.edu/programming/c/problems.htm

10. SoftEng or CS Graduate Program Search

11. FS: Programming and CS Books --- CHEAP

12. 1995 UT IEEE CS National Programming Contest

 

 
Powered by phpBB® Forum Software