IWriteFile - flush method

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
Post Reply
JLouisB
Posts: 67
Joined: Tue Jul 24, 2012 12:36 pm
Location: France

IWriteFile - flush method

Post by JLouisB »

Hi,
I use the the CReadFile class in a software to create a log file to help me to debug it when an user has a problem with it.
But to have the log file when there is an crash in the app, I need flush the buffer of the file often when I add things in the file.
Currently, the only solution to do this is to use createAndWriteFile and drop at each flush that I want to do, it's not the cleanest way to do this.

So I have just added a flush method in the IWriteFile; I don't know if it can be interesting for some other people, but if you think that it can be useful to add this in Irrlicht (it doesn't change the API and can bepotentially useful), this is my patch :
https://dl.dropboxusercontent.com/u/244 ... lush.patch
CuteAlien
Admin
Posts: 9634
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: IWriteFile - flush method

Post by CuteAlien »

Thanks, that looks indeed useful. I'll add it over the weekend.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
CuteAlien
Admin
Posts: 9634
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: IWriteFile - flush method

Post by CuteAlien »

Added in svn r5114.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
JLouisB
Posts: 67
Joined: Tue Jul 24, 2012 12:36 pm
Location: France

Re: IWriteFile - flush method

Post by JLouisB »

Ok, thanks
Post Reply