From 7acb0cf1fffd6079fd1854f0a734a1f565708c7e Mon Sep 17 00:00:00 2001 From: Vortex Date: Fri, 8 Mar 2024 10:02:21 -0600 Subject: [PATCH] Updated readme --- readme.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/readme.md b/readme.md index 6580de5..3cd3538 100644 --- a/readme.md +++ b/readme.md @@ -6,10 +6,9 @@ Please read the BrowserFS documentation! ## Backends -- `HTTPRequest`: Downloads files on-demand from a webserver using `fetch`. - `Storage`: Stores files in a `Storage` object, like `localStorage` and `seesionStorage`. - `IndexedDB`: Stores files into an `IndexedDB` object database. -- `WorkerFS`: Lets you mount the BrowserFS file system configured in the main thread in a WebWorker, or the other way around! +- `FileSystemAccess`: Store files using the [Web File System API](https://developer.mozilla.org/Web/API/File_System_API). For more information, see the [API documentation](https://browser-fs.github.io/dom). @@ -26,11 +25,11 @@ npm install @browserfs/dom You can use DOM backends, though you must register them if you plan on using `configure`: ```js -import { configure, fs, registerBackend } from '@browserfs/core'; +import { configure, fs } from '@browserfs/core'; import { Storage } from '@browserfs/dom'; -registerBackend(Storage); -await configure({ fs: 'Storage', options: { storage: localStorage } }); + +await configure({ backend: Storage, storage: localStorage }); if (!fs.existsSync('/test.txt')) { fs.writeFileSync('/test.txt', 'This will persist across reloads!');