Appearance
Function: openFolder()
ts
function openFolder(filePath: string): Promise<void>;Defined in: src/file/offerMwFile.tsx:216
Experimental
Open the folder where the file is located.
Parameters
| Parameter | Type | Description |
|---|---|---|
filePath | string | Path to the file whose parent folder to open. |
Returns
Promise<void>
Resolves when the folder opens.
Example
ts
const receiptPath = '/Users/me/Downloads/coffee-receipt.pdf';
await openFolder(receiptPath);
console.log('Opened the Downloads folder');