|
![](/i/fill.gif) |
On 6/7/2011 10:13, Orchid XP v8 wrote:
> So, essentially, your entire argument is "the user can eject the disk at any
> time, therefore it's unsafe to cache anything".
No. It's unsafe to cache data structures that have interrelationships. It's
unsafe to cache the data a pointer points to in RAM while writing the
pointer back to disk.
The FAT *is* cached. It's just *also* flushed when you close each file.
How would you tell the machine it's time to write the cache to the floppy?
> Correct me if I'm wrong, but wouldn't the contents of the disk be
> irrepairably corrupted *anyway*?
No. That's the point. You write things in the order that makes the files not
corrupted if you remove them. That's why if you chkdsk a floppy after
writing files but not closing them, you get "CHKDSK.001" type files.
--
Darren New, San Diego CA, USA (PST)
"Coding without comments is like
driving without turn signals."
Post a reply to this message
|
![](/i/fill.gif) |