Constructs a new WorkerFS instance that connects with BrowserFS running on the specified worker.
Create the file at path p with the given mode. Then, open it with the given flag.
Called once both local and remote sides are set up.
Opens the file at path p with the given flag. The file must exist.
The path to open.
The flag to use when opening the file.
Attaches a listener to the remote worker for file system requests.
Generated using TypeDoc
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.FileSystem.WorkerFS.attachRemoteListener(webWorkerObject);
WEBWORKER THREAD:
// Set the remote file system as the root file system. BrowserFS.initialize(new BrowserFS.FileSystem.WorkerFS(self));
Note that synchronous operations are not permitted on the WorkerFS, regardless of the configuration option of the remote FS.