prologic at prologitech.com
Mon May 5 12:11:32 CEST 2003
On Mon, May 05, 2003 at 11:52:46AM +0200, Peter Vreman wrote:
> > On Mon, May 05, 2003 at 11:35:14AM +0200, Peter Vreman wrote:
> >> > Hi,
> >> >
> >> > How do you check for file errors such as "Disk Full" before attempting
> >> > to write out a file to disk ?
> >> > You can easily check if a file exists with the fileExists function...
> >> > Can something similar be done for other file errors ?
> >> You can check with diskfree() how much space is left on a disk
> > Well the program I'm developing is irc services, any particular way
> > you'd reccomend recoding it so it doesn't crash because of a 'Disk Full'
> > error ?
> You can turn of io-checking and check the result of ioresult
> if ioresult<>0 then
> writeln(stderr,'Error writing to disk');
Is this considered good programming practise ? Reason I ask is that I
used to use borland's turbo pascal years ago and am aware of ioresult
but am interested in how people before me have done it (eg: on linux
The program I've been developing obviously have to be 100% stable :)
> fpc-pascal maillist - fpc-pascal at lists.freepascal.org
More information about the fpc-pascal