This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eryksun
Recipients Ben FrantzDale, cheryl.sabella, docs@python, eryksun, rhettinger, serhiy.storchaka, terry.reedy
Date 2018-05-02.18:10:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1525284608.17.0.682650639539.issue33275@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2018-05-02 18:10:08eryksunsetrecipients: + eryksun, rhettinger, terry.reedy, docs@python, serhiy.storchaka, cheryl.sabella, Ben FrantzDale
2018-05-02 18:10:08eryksunsetmessageid: <1525284608.17.0.682650639539.issue33275@psf.upfronthosting.co.za>
2018-05-02 18:10:08eryksunlinkissue33275 messages
2018-05-02 18:10:08eryksuncreate