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
IWriteFile - flush method
Re: IWriteFile - flush method
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
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: IWriteFile - flush method
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
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: IWriteFile - flush method
Ok, thanks