aboutsummaryrefslogtreecommitdiff
path: root/docs/api/file-io.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/api/file-io.md')
-rw-r--r--docs/api/file-io.md10
1 files changed, 2 insertions, 8 deletions
diff --git a/docs/api/file-io.md b/docs/api/file-io.md
index a79f6ad80..0f1642ef3 100644
--- a/docs/api/file-io.md
+++ b/docs/api/file-io.md
@@ -1,5 +1,5 @@
{% callout %}
-**Note** — Bun also provides an [almost complete](/docs/runtime/nodejs) implementation of the Node.js `fs` module, documented [here](https://nodejs.org/api/fs.html). This page only documents Bun-native APIs.
+**Note** — The `Bun.file` and `Bun.write` APIs documented on this page are heavily optimized and represent the recommended way to perform file-system tasks using Bun. Existing Node.js projects may use Bun's [nearly complete](/docs/runtime/nodejs) implementation of the [`node:fs`](https://nodejs.org/api/fs.html) module.
{% /callout %}
Bun provides a set of optimized APIs for reading and writing files.
@@ -234,13 +234,7 @@ interface Bun {
write(
destination: string | number | FileBlob | URL,
- input:
- | string
- | Blob
- | ArrayBuffer
- | SharedArrayBuffer
- | TypedArray
- | Response,
+ input: string | Blob | ArrayBuffer | SharedArrayBuffer | TypedArray | Response,
): Promise<number>;
}