> Hi Matt, > > Do your sd_card and hd libs use the info in the fat32? There is no > guarantee that files created are contiguous. Also how will you mark > the actual end of the file/contents? > > William
If you defragment your media, your files will be continuous. Win XP will even tell you how many files are fragmented. If you use the method I suggested to Sunish, you will not know the length of your data within the file. The file may be larger then what you have logged within it. Maybe leave the first sector of the log file blank, then go back and write the file size into it later, or have a seperate file for this data. It sounds like Sunish knows how much data he will be logging, and how many per day, so this method should be good. The problem is that if you want to modify only 1 byte within a sector, you have to read the entire sector (512 bytes) into an array, then modify the byte, then write back the sector again. So this is required for making file names, allocating file space, modifying a file size, etc. 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.
