You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add mount option { autoPersist: true } to IDBFS mount. (#21938)
* Add new setting -sIDBFS_AUTO_PERSIST which changes the semantics of an IndedexDB mount to automatically persist the VFS to IndexedDB after closing any file that has been written to. This enables users to avoid needing to call fsync() to persist files to the filesystem.
* Kick off persisting the filesystem on more operations. Fix test_idbfs_sync to properly delete IndexedDB state for the test if test fails.
* Update settings_reference.rst
* Propagate injected node_ops to the newly created child node
* Add [link] directive
* Move IDBFS_AUTO_PERSIST to a mount option rather than a -sSETTING.
* Address review.
* Add ChangeLog.md entry.
Copy file name to clipboardExpand all lines: site/source/docs/api_reference/Filesystem-API.rst
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -113,6 +113,8 @@ The *IDBFS* file system implements the :js:func:`FS.syncfs` interface, which whe
113
113
114
114
This is provided to overcome the limitation that browsers do not offer synchronous APIs for persistent storage, and so (by default) all writes exist only temporarily in-memory.
115
115
116
+
If the mount option `autoPersist: true` is passed when mounting IDBFS, then whenever any changes are made to the IDBFS directory tree, they will be automatically persisted to the IndexedDB backend. This lets users avoid needing to manually call `FS.syncfs` to persist changes to the IDBFS mounted directory tree.
0 commit comments