mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-27 20:41:58 +03:00
Add sqlite3_wasm_vfs_create_file() to replace Emscripten's FS.createDataFile() in a (mostly) VFS-agnostic way. Add a test for worker1's export (to bytearray) support. Re-add worker1 open-from-bytearray using sqlite3_wasm_vfs_create_file() but it's untested (requires a new interactive test app or maybe reconsideration).
FossilOrigin-Name: b35e1225c91a3cadc0d25af1e4e790237256d194990faa13190e343ed03e11c5
This commit is contained in:
@ -316,6 +316,8 @@ const installOpfsVfs = function callee(options){
|
||||
*/
|
||||
state.sq3Codes = Object.create(null);
|
||||
[
|
||||
'SQLITE_ACCESS_EXISTS',
|
||||
'SQLITE_ACCESS_READWRITE',
|
||||
'SQLITE_ERROR',
|
||||
'SQLITE_IOERR',
|
||||
'SQLITE_IOERR_ACCESS',
|
||||
@ -939,7 +941,7 @@ const installOpfsVfs = function callee(options){
|
||||
*/
|
||||
opfsUtil.entryExists = async function(fsEntryName){
|
||||
try {
|
||||
const [dh, fn] = await opfsUtil.getDirForFilename(filename);
|
||||
const [dh, fn] = await opfsUtil.getDirForFilename(fsEntryName);
|
||||
await dh.getFileHandle(fn);
|
||||
return true;
|
||||
}catch(e){
|
||||
|
Reference in New Issue
Block a user