Re: [Coding] fopen? Apr 1999 20:23:43 EST." <Pine.BSF.3.96.990401202112.25995A-100000@hiway1.exit109.com>

From: Jeremy Elson (jelson@circlemud.org)
Date: 04/01/99


Man pages are your friend.

Linux man page for fopen says:

       w      Truncate  file  to  zero length or create text file
              for writing.   The  stream  is  positioned  at  the
              beginning of the file.



Michael Cunningham writes:
>Does any one have any ideas about how I could go
>about zeroing out a text file? What modes would i use
>with fopen? Or should I just use system calls?
>Basically I have a file that updates every few minutes
>based on certain factors being present but when those
>factors arent present I cant figure out how to just zero
>out the file. Any ideas?
>
>
>Mike..
>--
>Speed of Lightning, Roar of Thunder!
>Fighting All Who Rob and Plunder...
>UnderDog.. Ahhahah UnderDog!
>
>
>     +------------------------------------------------------------+
>     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
>     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
>     +------------------------------------------------------------+


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST