Add exportFileBinary to FlipperLib

Reviewed By: antonk52

Differential Revision: D39692937

fbshipit-source-id: 7b3c78d004a9734cd8ae660d5782be1f02c00009
This commit is contained in:
Andrey Goncharov
2022-09-21 09:26:19 -07:00
committed by Facebook GitHub Bot
parent f3b7552338
commit 3314c77ce9
8 changed files with 43 additions and 0 deletions

View File

@@ -172,6 +172,25 @@ export interface FlipperLib {
encoding?: FileEncoding;
},
): Promise<string | undefined>;
/**
* @returns
* An exported file path (if available) or a file name.
* If user cancelled a file selection - undefined.
*/
exportFileBinary(
/**
* New file data
*/
data: Uint8Array,
options?: {
/**
* A file path suggestion for a new file.
* A dialog to save file will use it as a starting point.
* Either a complete path to the newly created file, a path to a directory containing the file, or the file name.
*/
defaultPath?: string;
},
): Promise<string | undefined>;
paths: {
appPath: string;
homePath: string;