The pseudo-hierarchical directories
In OpenStack Swift, object storage can simulate a hierarchical directory structure in containers by including a /
(forward slash) character in the object's name.
Let's upload a file (AMERICA/USA/Newyork.txt
) to the Continent
container using the following command:
# swift upload Continent AMERICA/USA/Newyork.txt
Now let's list the Continent
container, which has a few pseudo-hierarchical folders, using the following commands:
# swift list Continent AMERICA/USA/Newyork.txt ASIA/ASIA.txt ASIA/China/China.txt ASIA/INDIA/India.txt Australia/Australia.txt continent.txt
We can use /
as the delimiter parameter to limit the displayed results. We can also use the prefix parameter along with the delimiter parameter to view ...
Get OpenStack Object Storage (Swift) Essentials now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.