From: | Oliver Roberts |
Date: | 10 Dec 99 at 20:27:17 |
Subject: | Re: FRead()/FWrite() |
From: "Oliver Roberts" <oliver.roberts@iname.com>
On 10-Dec-99 14:23:56 GMT, David Arbuthnot wrote:
> I'm writing a copy routine and I would like to use FRead()/FWrite()
> however this is not possible as they don't return the number of
> bytes read but the number of blocks. The core of my routine looks
>
> while(br = FRead(fileSrc,dataBuffer,nibblesize,1))
> {
> FWrite(fileDst,dataBuffer,br*nibblesize,1);
> }
>
> <SNIP>
Why not just use a blocksize of 1? Like this:
while(br = FRead(fileSrc,dataBuffer,1,nibblesize))
{
FWrite(fileDst,dataBuffer,1,br);
}