> If you stop writing in the middle of a sector, that sector will not
> get written.

I guess I should correct myself here. I suppose it is possible that
the media may write a partial sector. This is dependent on hardware.
If the hard drive makers are smart, they would build them so they
could finish writing the sector before power dies completely. The
drive receives the full sector data before attempting to write it. I'm
not sure how sd card write their data (byte by byte, or all 512 bytes
at the same time). There could still be corruption in that sector for
either media device.

When writing a file with fat32, the file size can be updated during
the file write, or when you are finished writing it. Updating the file
size during the file write causes a speed problem on hard drives.
Maybe the file size should get updated every say 15 sectors or so.
I'll put a constant for this when I start writing files. This may
solve your corruption issue since you will know how much data was
correctly written.

I know some of you like his C library's, but why don't we test and
improve the Jallib libraries.

Matt.

-- 
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/jallib?hl=en.

Reply via email to