-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add sorting like in a user friendly file system option
Summary: When sorting files in macos or windows, when there is a group of digits, all things before being equal, sorting happens using numbers (not characters), and in case the numbers match, even if they look different ("1" vs "01"), then the rest of the string determines the order. We implement this logic in a helper compare function that gar can then use, so files can be sorted as one expects in the archive, when adding a folder. This will help with GHS data, that has 70,000 images in a folder, but only up to 3 leading zeros... so image0001.bin, image9999.bin, and image10000.bin... Ordering files in a gar archive controls how records are sorted on disk, which impacts streaming caching, so it's important to get this order correctly. Reviewed By: kiminoue7 Differential Revision: D51785203 fbshipit-source-id: 64a3d732f80e5e604144d8af3933954ecd54816e
- Loading branch information
1 parent
b619362
commit 414c7b5
Showing
3 changed files
with
124 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters