Documentation
On this page

Function · Desktop Services

showItemInFolder

Reveals a file or folder in the native file manager.

@sharpts/gui · SharpTS 572a2e31be0e

Signature

TypeScript
showItemInFolder(path: string): Promise<void>

Parameters

NameTypeDescription
pathstringLocal path to reveal.

Returns

Promise<void> — A promise completed after the native reveal request is submitted.

Remarks

This operation is currently supported only on Windows and resolves relative paths from the application directory.

Throws

  • When the platform is unsupported, the path is empty or missing, or Windows Explorer cannot be launched.

Examples

TypeScript
import { showItemInFolder } from "@sharpts/gui";

await showItemInFolder("output/preview.png");

Source

src/SharpTS.Gui.Sdk/GuiPackage/runtime.ts:1713 at SharpTS revision 572a2e31be0e2a09be0138bc44501b34d6245b51.