Re: How to Truncate a file opened by fopen()
- From: Kuang-Chun Cheng <kccheng openate com>
 
- To: Harsha Kodnad <harsha km tallysolutions com>
 
- Cc: GNOME <gnome-devel-list gnome org>, GTK <gtk-app-devel-list gnome org>
 
- Subject: Re: How to Truncate a file opened by fopen()
 
- Date: Thu, 16 Sep 2004 21:25:48 +0800
 
Just use option "w+" or "w".  For detail, try man page.
Regards,
Kuang-Chun Cheng
kccheng openate com
Harsha Kodnad wrote:
------------------------------------------------------------------------
Hi All,
 
    How can I truncate  a file opened by fopen() ?
 
    If I want to extend my file or truncate my file I have to use 
ftruncate, but ftruncate takes int (file descriptor) is there any 
function which takes FILE * ?
 
 
Thanks in advance
 
Best Regards,
 
Harsha Kodnad
Senior Software Engineer
Tally Solutions Pvt. Ltd.
Bangalore
 
Ph     : +91 80 302 82559 Ext : 327
Email :  harsha km tallysolutions com 
<mailto:harsha km tallysolutions com>
------------------------------------------------------------------------
_______________________________________________
gnome-devel-list mailing list
gnome-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gnome-devel-list
 
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]