@react-native-gpui/fs 0.0.0-stage → 0.0.1-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,8 @@
1
+ # Changelog
2
+
3
+ All notable changes to `@react-native-gpui/fs` are listed here. Each version's section becomes the notes of its GitHub release.
4
+
5
+ ## 0.0.1-alpha.0 - 2026-11-01
6
+
7
+ - First release.
8
+ - File system access for desktop apps.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Streetwriters
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,37 @@
1
- # Temporary Holding Version
1
+ # @react-native-gpui/fs
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ A file system API for desktop apps, shaped like Node's `node:fs`, with file dialogs and the operating system's well-known folders.
4
+
5
+ Part of [react-native-gpui](https://github.com/streetwriters/react-native-gpui), React Native for macOS, Windows and Linux.
6
+
7
+ ## Install
8
+
9
+ ```sh
10
+ npm install @react-native-gpui/fs
11
+ ```
12
+
13
+ ## Usage
14
+
15
+ ```js
16
+ import fs, { dialog, paths } from '@react-native-gpui/fs';
17
+
18
+ const text = fs.readFileSync(`${paths.documents}/notes.txt`, 'utf8');
19
+ await fs.promises.writeFile(
20
+ `${paths.appData}/state.json`,
21
+ JSON.stringify(state),
22
+ );
23
+
24
+ const [file] = await dialog.open({
25
+ filters: [{ name: 'Text', extensions: ['txt'] }],
26
+ });
27
+ ```
28
+
29
+ The default export has the synchronous, callback and promise forms of the common `node:fs` calls, with Node's encodings, `Stats`, `Dirent` and error codes. The module runs on its own thread, so slow files never block JavaScript or the interface.
30
+
31
+ ## Documentation
32
+
33
+ [File system](https://streetwriters.github.io/react-native-gpui/docs/desktop-file-system)
34
+
35
+ ## License
36
+
37
+ MIT. See [LICENSE](LICENSE).