Persist FS
emulators supports saving and restoring changes made in the file system. It works by dumping file system changes into a second bundle and using it to override the original file system on next load. This feature is backed by CommandInterface persist function.
You can implement your own save/load feature like this:
const bundle = <Uint8Array>;
const ci = await emulators.dosboxWorker(bundle);
// saving
const changesBundle = await ci.persist();
// <new session>
// loading
const ci = await emulators.dosboxWorker([bundle, changesBundle]);
13 октября 2026