WorkerFS lets you access a BrowserFS instance that is running in a different
JavaScript context (e.g. access BrowserFS in one of your WebWorkers, or
access BrowserFS running on the main page from a WebWorker).
For example, to have a WebWorker access files in the main browser thread,
do the following:
MAIN BROWSER THREAD:
// Listen for remote file system requests. BrowserFS.Backend.WorkerFS.attachRemoteListener(webWorkerObject);
WEBWORKER THREAD:
// Set the remote file system as the root file system. BrowserFS.configure({ fs:"WorkerFS", options: { worker:self }}, function(e) { // Ready! });
Note that synchronous operations are not permitted on the WorkerFS, regardless
of the configuration option of the remote FS.
WorkerFS lets you access a BrowserFS instance that is running in a different JavaScript context (e.g. access BrowserFS in one of your WebWorkers, or access BrowserFS running on the main page from a WebWorker).
For example, to have a WebWorker access files in the main browser thread, do the following:
MAIN BROWSER THREAD:
WEBWORKER THREAD:
Note that synchronous operations are not permitted on the WorkerFS, regardless of the configuration option of the remote FS.