According to the b2_list_file_names documentation "This call returns at most 1000 file names per transaction" and you can use the nextFileName
field to get the next 1000 files, and so on. It doesn't say in which order these files are returned, but the documentation for the similar b2_list_file_versions says "in alphabetical order by file name" so one might suspect it's the same for b2_list_file_names.
This would imply that any new files uploaded between calls to b2_list_file_names will not appear at the end of the list.
Is it possible to either choose chronological order for b2_list_file_names or in any other way get the latest uploaded files?
In order to avoid an XY Problem situation, this is what I really want to do:
Set legal_hold to "on" for all files, and do it for all new files once a week. Since I have ~400k files it costs money (I think) to list all files every time.
So another way to solve my problem would be to list all files with legal_hold not set to "on". Is that possible?