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