Appearance
Function: openFile()
ts
function openFile(filePath: string): Promise<void>;Defined in: src/file/offerMwFile.tsx:252
Experimental
Open the specified file.
Parameters
| Parameter | Type | Description |
|---|---|---|
filePath | string | Path to the file to open. |
Returns
Promise<void>
Resolves when the file opens.
Example
ts
await openFile('/Users/me/Documents/birthday-invite.png');
console.log('Opened the birthday invite in the default viewer');