synology_apm_repo.sdk.storage.prefix_listing module

Listing/probing helpers shared by S3Store/AzureStore (the prefix-addressed, directory-less backends) for ObjectStore.listdir/ exists. Each backend keeps its own pagination and exception translation.

synology_apm_repo.sdk.storage.prefix_listing.as_list_prefix(key)

key as a trailing-slash-terminated list prefix; an empty key (the store root) stays empty.

synology_apm_repo.sdk.storage.prefix_listing.sorted_relative_entries(raw_entries, list_prefix)

(full key, size) pairs sharing list_prefix (already delimiter-grouped) reduced to listdir()’s form: list_prefix and any trailing "/" trimmed, the prefix marker itself dropped, sorted by name, each keeping the size it was listed with.

async synology_apm_repo.sdk.storage.prefix_listing.exists_via_prefix_probe(*, head, error_type, is_not_found, probe_prefix)

ObjectStore.exists() for a directory-less backend: head() for an object exactly at the path, falling back to probe_prefix() (a “directory”) only when head() raises error_type and is_not_found recognizes it as absent. Other failures, such as permission errors, propagate.