I’m connecting to AWS S3 with the .net SDK.
I am currently pulling a list of blobs using the ListObjects()
I would like to pull the contents of my bucket while excluding folders.
I think filtering out items with a size of 0 will work but, I was hoping there might be a more direct way of doing this.
The possibly surprising answer to this is simply that the
ListObjectsResponseobject obtained from callingListObjects()should give you what you want. S3 doesn’t actually know about the concept of folders — the apparent “full path” of an S3 object is actually the object’s name.Any folders that you see in client apps are illusory and based on the shared convention that slashes in the name of S3 objects can be used to denote implied folders.