Object Keys and Folder Simulation
What you'll learn: How object storage uses key prefixes and delimiters to create the illusion of folders despite being fundamentally flat.
The Flat Reality
Object storage doesn't actually have folders or directories—it's completely flat. Every object in a bucket is stored with a unique key (its name), and all objects exist at the same level. There's no tree structure like on your computer's hard drive.
The Folder Illusion
However, cloud providers let you simulate a folder hierarchy using forward slashes (/) in your object keys. When you name objects with prefixes like:
images/2024/january/photo1.jpg
images/2024/january/photo2.jpg
images/2024/february/photo3.jpg
documents/reports/Q1-report.pdf
The storage system treats these as single, flat keys. But the cloud console and many tools will display them as if they were organized in folders:
images/
2024/
january/
february/
documents/
reports/
How It Works
The delimiter (/) acts as a visual separator. When you list objects, APIs can group keys by common prefixes, making it appear hierarchical. Think of it like organizing books on a single shelf by using labels—the shelf is still flat, but the labels create logical sections.
Why This Matters
This design gives you flexibility: you can organize objects logically for humans while the system maintains simplicity and performance. You can also search efficiently by prefix (e.g., "give me everything under images/2024/january/").
Key Takeaway: Object storage is flat, but using forward slashes in keys with delimiter-based grouping lets you simulate folders for organization—it's a visual convention, not actual directory nesting.