GetWorkSpaceFolderInfo

Function GetWorkSpaceFolderInfo 

Source
pub fn GetWorkSpaceFolderInfo(
    URIToMatch: Url,
) -> ActionEffect<Arc<dyn WorkSpaceProvider>, CommonError, Option<(Url, String, usize)>>
Expand description

Creates an effect that, when executed, will find the workspace folder that contains the given URI.

It uses the WorkSpaceProvider capability from the environment. This is useful for determining which folder-level settings apply to a specific file.

§Parameters

  • URIToMatch: The Url of the resource (e.g., a file) for which to find the containing workspace folder.

§Returns

An ActionEffect that resolves with an Option containing a tuple of the folder’s Url, name, and index, or None if the URI is not within any open workspace folder.