IPWorks Cloud 2020 Python Edition

Questions / Feedback?

blob_delimiter Property

The delimiter string to use when listing blobs.

Syntax

def get_blob_delimiter() -> str: ...
def set_blob_delimiter(value: str) -> None: ...

blob_delimiter = property(get_blob_delimiter, set_blob_delimiter)

Default Value

""

Remarks

If this property is non-empty when list_blobs is called, any blobs whose names contain the same string between the specified prefix and the first occurrence of the specified delimiter that follow will be rolled up into a "common prefix" element, which is returned in place of the individual blobs themselves.

The on_prefix_list event will fire once for each common prefix returned. If the StorePrefixList configuration setting is enabled, the class will also populate the PrefixCount and Prefix[i] configuration settings

Blob Namespace Traversal

By using the blob_delimiter and prefix properties in tandem, applications can effectively "traverse" a virtual hierarchy of blobs as if it were a filesystem. For example, assume that blobs with the following names exist within a container:

  • MyCompany
  • MyCompany/Department1
  • MyCompany/Department2
  • MyCompany/Department2/EmployeeA
  • MyCompany/Department2/EmployeeB

With blob_delimiter set to /, we can set prefix to successively "deeper" values before calling list_blobs for the following effect:

prefix Value Blobs Returned Prefixes Returned
(empty) MyCompany MyCompany/
MyCompany/ MyCompany/Department1
MyCompany/Department2
MyCompany/Department2/
MyCompany/Department2/ MyCompany/Department2/EmployeeA
MyCompany/Department2/EmployeeB
(none)

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks Cloud 2020 Python Edition - Version 20.0 [Build 8265]