Skip to content

Function: openFile()

ts
function openFile(filePath: string): Promise<void>;

Defined in: src/file/offerMwFile.tsx:252

Experimental

Open the specified file.

Parameters

ParameterTypeDescription
filePathstringPath 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');

Matterway Assistant SDK Documentation