You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/filesystem/README.md
+35-11Lines changed: 35 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -16,11 +16,11 @@ A primitive that allows to manage different file system access methods:
16
16
-`createAsyncFileSystem` - Adds a reactive layer to an asynchronous file system adapter
17
17
-`makeNoFileSystem` - Adapter that provides a synchronous mock file system
18
18
-`makeNoAsyncFileSystem` - Adapter that provides an asynchronous mock file system
19
-
-`makeVirtualFileSystem` - Adapter that provides a virtual file system that doubles as FsMap for `typescript-vfs` with its `.toMap()` method.
20
-
-`makeWebAccessFileSystem` (client only) - Adapter that provides access to the actual filesystem in the browser using a directory picker
21
-
-`makeNodeFileSystem` (server only) - Adapter that abstracts the node fs/promises module for the use with this primitive
22
-
-`makeTauriFileSystem` (tauri with fs access enabled only) - Adapter that connects to the tauri fs module
23
-
-`makeChokidarWatcher` - (experimental): use chokidar to watch for file system changes and trigger reactive updates
19
+
-`makeVirtualFileSystem` - Adapter that provides a virtual file system that doubles as `FsMap` for `typescript-vfs` with its `.toMap()` method.
20
+
-`makeWebAccessFileSystem` (client only) - Adapter that provides access to the actual file system in the browser using a directory picker or a given `webkitEntry` from an input with the `webkitdirectory` attribute set
21
+
-`makeNodeFileSystem` (server only) - Adapter that abstracts the node `fs/promises` module for the use with this primitive
22
+
-`makeTauriFileSystem` (`tauri` with `fs` access enabled only) - Adapter that connects to the `tauri fs` module
23
+
-`makeChokidarWatcher` - (experimental): use `chokidar` to watch for file system changes and trigger reactive updates
24
24
-`rsync` - small tool to copy over recursively from one file system or adapter to another
25
25
26
26
## Installation
@@ -67,13 +67,13 @@ export type AsyncFileSystemAdapter = {
67
67
68
68
To support an unsupported file system, you can provide a wrapper with one of the same APIs.
69
69
70
-
If no rename method is given, mkdir/writeFile/rm are used to achieve the same effect. An actual rename call will be more performant, though.
70
+
If no `rename` method is given, `mkdir/writeFile/rm` are used to achieve the same effect. An actual `rename` call will be more performant, though.
71
71
72
-
The `createFileSystem` call then creates a reactive surface above each of these APIs so that the return values of all reading calls are signals for synchronous and resources for asynchronous filesystem adapters; writing methods for asynchronous APIs will return the same promise for convenience reasons.
72
+
The `createFileSystem` call then creates a reactive surface above each of these APIs so that the return values of all reading calls are signals for synchronous and resources for asynchronous file system adapters; writing methods for asynchronous APIs will return the same promise for convenience reasons.
73
73
74
-
There is experimental support for a watcher as second argument in `createFileSystems`, which triggers reactive updates on external filesystem changes. Currently, there is only experimental support for chokidar for the node filesystem.
74
+
There is experimental support for a watcher as second argument in `createFileSystems`, which triggers reactive updates on external file system changes. Currently, there is only experimental support for `chokidar` for the node file system.
75
75
76
-
These getters returned from reading methods are bound to Solid's reactivity so that they will automatically cause effects using them outside of untrack() to re-run on updates. Getters may initially return undefined, but will update to the correct value once evaluated.
76
+
These getters returned from reading methods are bound to Solid's reactivity so that they will automatically cause effects using them outside `untrack()` to re-run on updates. Getters may initially return undefined, but will update to the correct value once evaluated.
In some cases, you might need to move data from one file system (or adapter) to another one. In order to do so, this package comes with an rsync utility:
158
+
In some cases, you might need to move data from one file system (or adapter) to another one. In order to do so, this package comes with a rsync utility:
0 commit comments