A pine-resin still stores jar photos under the virtual folder 2026/aug/ in one blob container and must list only that folder’s blobs. Which approach should the developer use with the Blob SDK?
Select an answer to reveal the explanation.
Short Explanation
A prefix is like asking the clerk for aisle 2026/aug/ instead of dumping the whole warehouse on the counter. Cosmos SQL does not query Blob names. You can page with a prefix on ordinary flat-namespace containers—no need to turn this into a Data Lake redesign.
Full Explanation
Blob listing is a flat namespace with optional delimiter semantics; virtual folders are path prefixes in blob names. To list only jar photos under 2026/aug/, the pine-resin still should call list APIs with Prefix set to 2026/aug/ and page through continuation tokens until complete. The service returns only names that start with that prefix, which is efficient and correct without downloading object bodies. That is the standard SDK approach for “list this virtual folder.”
A Cosmos DB SQL query against the storage account endpoint fails because Blob Storage listing is not Cosmos SQL. Mixing query languages across services is a distractor that does not enumerate blobs by prefix.
Enabling hierarchical namespace solely so listing ignores prefixes fails the concept: HNS (Data Lake) changes directory semantics, but it is not required for prefix filtering on ordinary blob containers, and enabling it “so listing ignores prefixes” misstates how both flat and HNS listing work. Prefix filters remain the way to narrow results.
Downloading every blob and filtering in application memory fails on cost, latency, and scale. Listing with a prefix pushes filtering to the service; client-side full-container downloads are not an acceptable substitute for prefix listing.
Exam caveat: prefix matching is case-sensitive and literal—2026/Aug/ does not match 2026/aug/, and omitting the trailing slash can include sibling names that share a longer prefix unexpectedly. Operational check: upload a blob under 2026/aug/ and one outside it, list with prefix 2026/aug/, and confirm only the in-folder name appears across all pages.