synology_apm_repo.sdk.storage.prefix_listing module¶
Shared listing/probing shapes S3Store/AzureStore (the two
prefix-addressed, directory-less backends) both need to implement
ObjectStore.listdir/ObjectStore.exists — each backend still owns
its own pagination mechanics and exception translation; only the parts
that are identical regardless of backend live here.
- synology_apm_repo.sdk.storage.prefix_listing.as_list_prefix(key)¶
key(possibly empty, for a listing/probe at the store’s root) turned into the trailing-slash-terminated prefix both backends’listdir/existslist/probe calls key off — empty stays empty rather than becoming a bare"/".
- synology_apm_repo.sdk.storage.prefix_listing.sorted_relative_names(raw_names, list_prefix)¶
raw_names(absolute keys/blob names sharinglist_prefix, already delimiter-grouped by the caller’s own backend-specific listing call) reduced tolistdir()’s own contract: each name withlist_prefixand any trailing"/"trimmed off, the prefix marker itself (which trims to"") dropped, sorted.
- async synology_apm_repo.sdk.storage.prefix_listing.exists_via_prefix_probe(*, head, error_type, is_not_found, probe_prefix)¶
ObjectStore.exists()’s shared shape for a backend with no real directory entities: a directhead()lookup for an object exactly at the path, falling back toprobe_prefix()(at least one object under it, i.e. a “directory”) only whenhead()fails witherror_typeandis_not_foundrecognizes it as absent rather than some other failure (a permissions error, say, is never treated as “does not exist”).error_typeis caught exactly as narrowly as each backend’s ownexists()always has — never a bareException— so nothing here changes which failures propagate.