Message316084
FAT inserts a new file entry in a directory at the first available position. (If it's a long filename, this could be up to 21 contiguous dirents for a combined long/short dirent set.) This means a directory listing is usually in the same order that files were added. One caveat is that dirents for deleted files may be reused once there are no more unused entries available in a cluster. (I'd expect this depends on the implementation. Also, this is less likely with a long filename, since it needs a large-enough contiguous block of dirents.) Given a volume with a 4 KiB cluster size, sans overhead there are 127 32-byte dirents in a cluster.
I used to have an MP3 player that used FAT32 and only played files in directory order, so I had to resort directories on disk after adding files. In Ubuntu Linux, I see there's a "fatsort" package that implements this. There's probably a build available for MacOS. |
|
Date |
User |
Action |
Args |
2018-05-02 18:10:08 | eryksun | set | recipients:
+ eryksun, rhettinger, terry.reedy, docs@python, serhiy.storchaka, cheryl.sabella, Ben FrantzDale |
2018-05-02 18:10:08 | eryksun | set | messageid: <1525284608.17.0.682650639539.issue33275@psf.upfronthosting.co.za> |
2018-05-02 18:10:08 | eryksun | link | issue33275 messages |
2018-05-02 18:10:08 | eryksun | create | |
|