|
![](/i/fill.gif) |
I've got a pretty complex problem...
What I want my system to do is to read positions,
generate some new data from that, and write those
back to disk.
In order to make handling easy, the positions are first
copied (by reading and writing) to another file, from
which I read. This enables me to write in the original
file, thus making usage in animations etc. very easy.
Problem is, the system crashes when trying to write data
it read from an empty file. I would expect it to crash when
reading from an empty file, but not when writing the empty
data. Guess this has to do with internal handling of
identifiers etc.
Still, I'd like to make my system crash-proof. As long as
new positions are generated, everything works fine, but
I need to check if a file is empty, and then stop the system
from trying anything if that is the case.
So, how do I check if an opened file is actually empty?
--
Tim Nikias
Homepage: http://www.digitaltwilight.de/no_lights/index.html
Email: Tim### [at] gmx de
Post a reply to this message
|
![](/i/fill.gif) |