Ok, I managed to squeeze a bit more info from the manufacturer. It is
the FAT volume directory. Can this be accessed and altered without
erasing and rewritting files?
> [Hmmmm... not a programming-related question, so I'm putting [OT] up
> there.]
[quoted text clipped - 24 lines]
>
> - â
In article <1h68n3p.pwkegj969ad2N%millenomi@gmail.com>, l0ne (on mac)
<millenomi@gmail.com> wrote:
> T-n-T <lildog@donobi.net> wrote:
>
[quoted text clipped - 6 lines]
> cannot (in general) guarantee this order to be a specific one on most
> filesystems.
> Ok, I managed to squeeze a bit more info from the manufacturer. It is
> the FAT volume directory. Can this be accessed and altered without
> erasing and rewritting files?
Yes, that generally is possible. I doubt that there are system calls to
do that, but you could write a tool to directly manipulate the directory
contents (see for example <http://forensics.cs.uri.edu/readings/FAT.htm>
for a description of this format)
There may be an easier way to get the files listed in a given order: the
FAT filesystems I have checked this on all seemed to use a 'first fit'
rule for adding new directory entries.
So, if you start with an empty directory, add files A, B, C and D (in
that order), a directory listing will list them in that order.
If you now rename any of the files, the order will still be A, B, C, D.
If you now delete file C, the order will be A, B, D.
If you then add a file named E, the order will be A, B, E, D.
I would guess that this scheme would break down when using long
filenames (for example: if the name of file A was 16 characters, and you
rename it to be 5 characters, that could create an empty slot to store a
short filename between files A and B)
Of course, all of this is dependent on the implementation of the file
system driver. The order an OS lists the files in a directory need not
even be constant on a given operating system.
Reinder