A default resolver that uses a given reference path and a contents manager.

Hierarchy

  • UrlResolver

Implements

Constructors

Properties

_contents: any
_path: any

Accessors

  • get path(): string
  • The path of the object, from which local urls can be derived.

    Returns string

  • set path(value): void
  • Parameters

    • value: string

    Returns void

Methods

  • Get the download url of a given absolute url path.

    Notes

    The returned URL may include a query parameter.

    Parameters

    • urlPath: string

    Returns Promise<string>

  • Whether the URL should be handled by the resolver or not.

    Parameters

    • url: string
    • Optional allowRoot: boolean

      Whether the paths starting at Unix-style filesystem root (/) are permitted.

      Notes

      This is similar to the isLocal check in URLExt, but it also checks whether the path points to any of the IDrives that may be registered with the contents manager.

    Returns boolean

  • Whether the URL can be decoded using decodeURI.

    Parameters

    • url: string

    Returns boolean

  • Resolve a path from Jupyter kernel to a path:

    • relative to root_dir (preferrably) this is in jupyter-server scope,
    • path understood and known by kernel (if such a path exists). Returns null if there is no file matching provided path in neither kernel nor jupyter-server contents manager.

    Parameters

    • path: string

    Returns Promise<IRenderMime.IResolvedLocation>

  • Resolve a relative url to an absolute url path.

    Parameters

    • url: string

    Returns Promise<string>

Generated using TypeDoc