MCPcopy Create free account
hub / github.com/LeetCode-OpenSource/vscode-leetcode / getBelongingWorkspaceFolderUri

Function getBelongingWorkspaceFolderUri

src/utils/uiUtils.ts:95–104  ·  view source on GitHub ↗
(fsPath: string | undefined)

Source from the content-addressed store, hash-verified

93}
94
95function getBelongingWorkspaceFolderUri(fsPath: string | undefined): vscode.Uri | undefined {
96 let defaultUri: vscode.Uri | undefined;
97 if (fsPath) {
98 const workspaceFolder: vscode.WorkspaceFolder | undefined = vscode.workspace.getWorkspaceFolder(vscode.Uri.file(fsPath));
99 if (workspaceFolder) {
100 defaultUri = workspaceFolder.uri;
101 }
102 }
103 return defaultUri;
104}
105
106export async function showDirectorySelectDialog(fsPath?: string): Promise<vscode.Uri[] | undefined> {
107 const defaultUri: vscode.Uri | undefined = getBelongingWorkspaceFolderUri(fsPath);

Callers 2

showFileSelectDialogFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected