|
3 | 3 | [](https://hex.pm/packages/simplifile) |
4 | 4 | [](https://hexdocs.pm/simplifile/) |
5 | 5 |
|
6 | | -Simplifile provides synchronous operations for working with files and directories that work for all |
7 | | -non-browser targets (Erlang, Node, Deno, and Bun). |
| 6 | +Simplifile provides synchronous operations for working with files and directories that work for all |
| 7 | +non-browser targets (Erlang, Node, Deno, and Bun). |
8 | 8 |
|
9 | 9 | ## When should I use `simplifile`? |
10 | 10 |
|
11 | | -Simplifile makes a simple tradeoff: it confines itself to a subset of purely synchronous file/directory utilities |
| 11 | +Simplifile makes a simple tradeoff: it confines itself to a subset of purely synchronous file/directory utilities |
12 | 12 | so that it can have one API for all targets. Erlang and JavaScript have fundamentally different concurrency |
13 | 13 | models, so bindings to async code will simply be different for different targets. |
14 | 14 |
|
15 | | -You *should* use simplifile if |
| 15 | +You *should* use simplifile if |
16 | 16 | 1. The same code running on JS and Erlang targets is important |
17 | 17 | 2. Sync file operations will not be a major performance bottleneck (dev tooling, configuration, scripting, etc.) |
18 | 18 | 3. You just wanna do some basic file operations and get on with life |
19 | 19 |
|
20 | 20 | If you think you need a different solutions, these projects may be helpful: |
21 | | -[File streams (erlang target)](https://github.com/richard-viney/file_streams) |
| 21 | +[File streams](https://github.com/richard-viney/file_streams) |
22 | 22 |
|
23 | 23 | ## Upgrading to 2.0 |
24 | 24 |
|
25 | 25 | Please consult the changelog, but basically: |
26 | 26 | The deprecated `is_file`, `is_directory` functions have been removed. |
27 | 27 | The `verify_is_file`, `verify_is_directory`, and `verify_is_symlink` have had their verify_ prefixes removed (now `is_file`, `is_directory`, `is_symlink` respectively). |
28 | | -The `Unknown` variant of `FileError` now has an inner `String`. |
| 28 | +The `Unknown` variant of `FileError` now has an inner `String`. |
29 | 29 |
|
30 | 30 | ## Example |
31 | 31 | ```gleam |
|
0 commit comments