I'm not sure I understand your comment.  Here, prefix is "bucket prefix", or path of the file you want.  The public api has a list which sets this to "", or the root of the bucket, if you call that one.  So it's not really related to checking the response, just the path to the files that you want (i.e. mybucket/foo/bar/*)

I do agree that checking NextMarker is probably better than making a new web request and checking to see if the listResponse is empty (which is what the code is currently doing), so I think it's correct but just makes an extra unnecessary request to see if we're finished or not.