Originally Posted By: peter
This occasionally gets suggested as a way of talking to Empegs (or other MP3 players), whereupon what usually happens is that Mark Lord opines that it wouldn't be all that hard, and I opine that in fact it jolly well would. One major difficulty is that there's no guarantee that you get the cluster writes in any particular order: if you get all the data clusters first, you have no idea what file is being written (or rewritten) until you get the writes that update the parent directory's clusters and the FAT.


smile I still don't think it's tricky at all. Just write the clusters to disk, and wait for a FAT update that references them. There's a chance that one might then have to go back and split up previously written data if the FAT indicates multiple files, but that's about it. Not hard to keep track, though.

There are theoretical worst cases where performance would be miserable, but I suspect real-life to be more straightforward. Most uses of FAT involve writing a single file at a time.

Shouldn't be more than a few weeks of effort for somebody on a Google Summer of Code project.

Cheers.