[fpc-pascal]File errors

Marco van de Voort marcov at stack.nl
Mon May 5 13:36:41 CEST 2003

[ Charset ISO-8859-1 unsupported, converting... ]
> > 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

Can be dangerous in multi tasking and/or multi user system. Also that
doesn't keep track of e.g. the reserved rootspace on unix.

Best way is to check ioresult after writing each block to see if it is zero?

More information about the fpc-pascal mailing list