Skip to content

Commit

Permalink
expose create file data
Browse files Browse the repository at this point in the history
  • Loading branch information
linhttbk97 committed Dec 10, 2023
1 parent a8fdace commit 6905c12
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions src/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -325,17 +325,6 @@ Module["onRuntimeInitialized"] = function onRuntimeInitialized() {
return true;
};

/** @classdesc
* Create a database file from a Uint8Array containing its contents
* @param {number[]} data An array of bytes representing
* an SQLite database file
* @param {string} filePath path to the database file
*/

this.prototype["createFileData"] = function createFileData(data,filePath) {
FS.createDataFile("/", filePath, data, true, true);
}

/** Execute the statement, fetching the the next line of result,
that can be retrieved with {@link Statement.get}.
Expand Down Expand Up @@ -1301,4 +1290,7 @@ Module["onRuntimeInitialized"] = function onRuntimeInitialized() {
FS.root = null;
FS.staticInit();
}
Module["createFileData"] = (data,filePath) =>{
FS.createDataFile("/", filePath, data, true, true);
}
};

0 comments on commit 6905c12

Please sign in to comment.