Skip to content

Function: fileToDrive()

ts
function fileToDrive(file: SdkFile, filepath: string): Promise<void>;

Defined in: src/file/offerFile.tsx:69

Parameters

ParameterTypeDescription
fileSdkFileThe SdkFile object containing the data to write.
filepathstring-

Returns

Promise<void>

Promise of void

Deprecated

Writes a file to the local drive.

Example

ts
const file = { name: 'example.txt', data: 'SGVsbG8gV29ybGQh', type: 'text/plain' };
const path = 'documents';
await fileToDrive(file, path);

Matterway Assistant SDK Documentation