Skip to content

Allow revealing folders in workspace with revealInExplorer command #160504

@schlicker

Description

@schlicker

Problem
When using the following code the corresponding file is highlighted in the files explorer:

vscode.commands.executeCommand(
  "revealInExplorer",
  vscode.Uri.file(path.join("path", "to", "folder", "existingFile.txt"))
);

When I just want to highlight a folder it doesn't work:

vscode.commands.executeCommand(
  "revealInExplorer",
  vscode.Uri.file(path.join("path", "to", "folder"))
);

I also tried vscode.Uri.parse with the same result.
Is this intended behaviour? And if so - is there a command to just reveal a folder?

Further info

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugfile-explorerExplorer widget issueshelp wantedIssues identified as good community contribution opportunities

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions