wsgidav.samples.virtual_dav_provider.RootCollection.get_ref_url

RootCollection.get_ref_url()

Return the quoted, absolute, unique URL of a resource, relative to appRoot.

Byte string, UTF-8 encoded, quoted. Starts with a ‘/’. Collections also have a trailing ‘/’.

This is basically the same as get_preferred_path, but deals with ‘virtual locations’ as well.

e.g. ‘/a/b’ == ‘/A/b’ == ‘/bykey/123’ == ‘/byguid/abc532’

get_ref_url() returns the same value for all these URLs, so it can be used as a key for locking and persistence storage.

DAV providers that allow virtual-mappings must override this method.

See also comments in DEVELOPERS.txt glossary.