wsgidav.util.get_uri_parent#

wsgidav.util.get_uri_parent(uri: str) str | None[source]#

Return URI of parent collection with trailing ‘/’, or None, if URI is top-level.

This function simply strips the last segment. It does not test, if the target is a ‘collection’, or even exists.