POV-Ray : Newsgroups : povray.advanced-users : File I/O handling... : File I/O handling... Server Time
29 Jul 2024 10:21:07 EDT (-0400)
  File I/O handling...  
From: Tim Nikias
Date: 4 Aug 2002 10:01:49
Message: <3d4d33cd$1@news.povray.org>
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] gmxde


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.