Filesystem entry sort order of file list
Posted: Fri Jul 23, 2021 11:16 pm
Please bear with me, this is not easy for me to describe.
Sometimes (with some programs) a list of files, or the whole number of files of a directory, is accessed in descendant order instead of ascendant.
e.g. if I back up files with "backup" (os4depot), the files are read in in ascending order from a to z, but written to the backup medium in descending order (z to a).
A fellow coder has the same problem with his program.
He thinks it might be because MatchFirst() and MatchNext() on the lowest level (FS Handler?) could be pointing to the last entry and as such would turn around the sort (accessing) order.
Is there a way to prevent that and always use the same sort/accessing order? (Either a to z or a to a)
Thank you for explanations and workaround ideas
Sometimes (with some programs) a list of files, or the whole number of files of a directory, is accessed in descendant order instead of ascendant.
e.g. if I back up files with "backup" (os4depot), the files are read in in ascending order from a to z, but written to the backup medium in descending order (z to a).
A fellow coder has the same problem with his program.
He thinks it might be because MatchFirst() and MatchNext() on the lowest level (FS Handler?) could be pointing to the last entry and as such would turn around the sort (accessing) order.
Is there a way to prevent that and always use the same sort/accessing order? (Either a to z or a to a)
Thank you for explanations and workaround ideas