Forward slashes in object names

Content Platform Tenant Management Help

Version
9.7.x
File Size
4269 KB
Audience
anonymous
Part Number
MK-95HCPH002-19

When using the S3 compatible API, you can view objects as being in a flat space or in a structured space:

  • In a flat space, objects are not grouped by any sort of structural elements, such as folders (also called directories), and forward slashes (/) in object names are simply part of those names.
  • In a structured space, forward slashes in object names serve as folder separators, and objects can be grouped into folders.

To support the structured view, when you use the S3 compatible API to store an object that has forward slashes in its name, HCP also creates folders and subfolders that conform to the pattern of those forward slashes. For example, if you store an object named quarterly_rpts/Q4_2019, HCP not only stores that object but also creates a folder named quarterly_rpts.

HCP does not create duplicate folders. If, after storing the object named quarterly_rpts/Q4_2019, you store an object named quarterly_rpts/Q3_2019, the single quarterly_rpts folder appears to contain two objects: Q4_2019 and Q3_2019.

Folders provide a method for organizing the objects you store in a bucket. By using meaningful names for the portions of object names from which HCP creates folders, you can more easily manage the contents of the bucket.

You can also use the S3 compatible API to create folders and subfolders by themselves. For example, you could create a folder named mktg with a subfolder named budget_proposals. If you then store an object named mktg/budget_proposals/BudgProp-2020, that object appears to be in the mktg/budget_proposals folder. Folder names follow the same rules as object names.

When you use HCP interfaces other than the S3 compatible API to view or manage objects stored through the S3 compatible API, HCP always treats forward slashes in object names as folder separators. So, for example, in the Namespace Browser, the object you stored as quarterly_rpts/Q4_2019 shows up as an object named Q4_2019 in the quarterly_rpts folder.

Grouping objects into folders not only lets you more easily manage those objects, it can also enhance HCP performance.