Information Technology Reference
In-Depth Information
// Get the sector number of the file's current cluster.
l = Cluster2Sector(dsk,fo -> ccls);
// Add the number of the current sector within the cluster.
l += (word)fo -> sec;
// Read the sector.
if (SectorRead(l, dsk->buffer) != sdcValid)
error = CE_BAD_SECTOR_READ;
sectorloaded = TRUE;
// Save the file's size.
size = fo -> size;
// Write to the file until finished or an error.
while (error == CE_GOOD && tempo > 0)
{
if (seek == size)
{
// It's the end of the file. Set the flag.
fo -> Flags.FileWriteEOF = TRUE;
}
Search WWH ::




Custom Search