• Returns a URI where the path is the directory name of the input uri, similar to the Unix dirname command. In the path, '/' is recognized as the directory separation character. Trailing directory separators are ignored. The orignal URI is returned if the URIs path is empty or does not contain any path segments.

    Parameters

    • uri: URI

      The input URI.

    Returns URI

    The last segment of the URIs path.