getWorkspaceFolder

Returns the workspace folder that contains a given uri.

  • returns undefined when the given uri doesn't match any workspace folder

  • returns the input when the given uri is a workspace folder itself

Parameters

uri

An uri.