Re: How to Truncate a file opened by fopen()



Hi,

I am using fileno() and after doing ftruncate how does stdio refresh its
buffers?
My fread() function fails after calling ftruncate since it is truncating at
low level.

Cheers!

Harsha Kodnad
Senior Software Engineer
Tally Solutions Pvt. Ltd.
Bangalore

Ph     : +91 80 302 82559 Ext : 327
Email :  harsha km tallysolutions com

----- Original Message ----- 
From: "Kevin DeKorte" <kdekorte yahoo com>
To: <gtk-app-devel-list gnome org>
Cc: "Harsha Kodnad" <harsha km tallysolutions com>; "GNOME"
<gnome-devel-list gnome org>
Sent: Thursday, September 16, 2004 7:21 PM
Subject: Re: How to Truncate a file opened by fopen()


Used fileno() to convert a FILE * to a file descriptor.

Kevin

On Thursday 16 September 2004 07:18 am, 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
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]