I think I understand the comment but it's not entirely applicable. If you use a "vague" prefix like "myprefix/files/" that might yield so many results that, due to pagination I guess, you might miss the file you're looking for.
In my case I use the whole file name as the prefix.
Comment
I just searching for the solution.
I think list object is not matching for buckets with large amount of files.
Replies
Really? What makes you think that? Are you saying it the result might different between HeadObject vs. ListObjectsV2 ...when the bucket is huuuge?
Was this ever investigated?
I believe you should use markers to iterate over list of files in the bucket by using Prefix.
I think I understand the comment but it's not entirely applicable. If you use a "vague" prefix like "myprefix/files/" that might yield so many results that, due to pagination I guess, you might miss the file you're looking for.
In my case I use the whole file name as the prefix.