Skip to content

Function: mwFileToDrive()

ts
function mwFileToDrive(file: MwFile, filepath: string): Promise<void>;

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

Experimental

Write an MwFile to the local file system.

Parameters

ParameterTypeDescription
fileMwFileThe MwFile to write.
filepathstringDestination directory path.

Returns

Promise<void>

Resolves when the file is written.

Example

ts
const report = await generateMonthlyReport();
await mwFileToDrive(report, '/Users/me/Documents/Reports');
console.log('Saved', report.name, 'to Reports folder');

Matterway Assistant SDK Documentation