[fpc-pascal]File errors
James Mills
prologic at prologitech.com
Mon May 5 11:50:06 CEST 2003
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 ?
I actually found out that my disk got full because iroffer
(www.iroffer.org) has a bug in it and went into an infinite loop today
100% cpu usage writing out data to a log file using up my entire disk
drive.
But this eventually caused services to crash because it couldn't write
out it's own log...
cheers
James
>
>
> Peter
>
> _______________________________________________
> fpc-pascal maillist - fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
More information about the fpc-pascal
mailing list