[fpc-pascal] File copying

Marc Santhoff M.Santhoff at t-online.de
Mon May 3 00:25:36 CEST 2004


Am So, den 02.05.2004 schrieb Matthews um 23:40:
> I'm writing code that includes file copying, but the method I'm currently 
> using is far too slow.  I'm currently just reading a file
> character by character, and spitting it out to another file, character by 
> character.  Unfortunately, that's brutally slow.
> 
> Any suggestions on a better method?

As known from Borlands compilers: use "blockread" and "blockwrite" (fpc
should know, doesn't it?) or do it in larger chunks and implement
buffering.

HTH,
Marc





More information about the fpc-pascal mailing list