make_relative_url_if_possible#

omni.client.make_relative_url_if_possible(base_url: str, path_or_url: str) str#

This function is a wrapper of omni.client.make_relative_url to handle anonymous layer and convert returned URL to raw filesystem path if possible. Also, the final URL or path will be normalized.

Parameters:
  • base_url (str) – Base URL for relative path calculation.

  • path_or_url (str) – Path or URL to make relative.

Returns:

Relative URL or normalized path.

Return type:

str