Skip to content

Commit

Permalink
docs: ✏️ improve docs
Browse files Browse the repository at this point in the history
  • Loading branch information
streamich committed Jun 21, 2023
1 parent 6c2d0f5 commit 730fb13
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ npm i memfs

## See also

- [`spyfs`][spyfs] - spies on filesystem actions
- [`unionfs`][unionfs] - creates a union of multiple filesystem volumes
- [`linkfs`][linkfs] - redirects filesystem paths
- [`fs-monkey`][fs-monkey] - monkey-patches Node's `fs` module and `require` function
- [`linkfs`][linkfs] - redirects filesystem paths
- [`spyfs`][spyfs] - spies on filesystem actions

[spyfs]: https://github.com/streamich/spyfs
[unionfs]: https://github.com/streamich/unionfs
[linkfs]: https://github.com/streamich/linkfs
[fs-monkey]: https://github.com/streamich/fs-monkey
[linkfs]: https://github.com/streamich/linkfs
[spyfs]: https://github.com/streamich/spyfs


## License
Expand Down
13 changes: 6 additions & 7 deletions docs/fsa/fs-to-fsa.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
# Node `fs` API to File System Access API

`memfs` implements the web [File System Access (FSA) API][fsa] (formerly known as
Native File System API) on top of Node's `fs`-like filesystem API.

This means you can instantiate an FSA-compatible API on top of Node.js `fs` module,
or on top of `memfs` [in-memory filesystem](../node/index.md), or on top of any other filesystem
that implements Node's `fs` API.
Native File System API) on top of Node's `fs`-like filesystem API. This means you
can instantiate an FSA-compatible API on top of Node.js `fs` module,
or on top of `memfs` [in-memory filesystem](../node/index.md), or on top of any
other filesystem that implements Node's `fs` API.

[fsa]: https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API

Expand All @@ -20,10 +19,10 @@ import { nodeToFsa } from 'memfs/lib/node-to-fsa';
const dir = nodeToFsa(fs, '/path/to/folder', {mode: 'readwrite'});
```

The `fs` Node filesystem API can be the real `fs` module or any, for example,
The `fs` Node filesystem API can be the real `fs` module or any `fs` like object, for example,
an in-memory one provided by `memfs`.

Now you can use the `dir` handle to execute any of the File System Access API
Now you can use the `dir` handle to execute all the File System Access API
methods, for example, create a new file:

```js
Expand Down

0 comments on commit 730fb13

Please sign in to comment.