aboutsummaryrefslogtreecommitdiff
path: root/docs/api/file-io.md
diff options
context:
space:
mode:
authorGravatar Colin McDonnell <colinmcd94@gmail.com> 2023-02-24 16:33:53 -0800
committerGravatar GitHub <noreply@github.com> 2023-02-24 16:33:53 -0800
commit18362505429f99662f4423264147896d23313dbe (patch)
treef3589c33ca01a3d1118836732f55fc05bf87f30c /docs/api/file-io.md
parent1d85b5efa83a28c46e50ebae041ac480b33fb116 (diff)
downloadbun-18362505429f99662f4423264147896d23313dbe.tar.gz
bun-18362505429f99662f4423264147896d23313dbe.tar.zst
bun-18362505429f99662f4423264147896d23313dbe.zip
Docs tweaks (#2160)
* Tweaks * Add ecosystem. Add bunx. Flesh out install. * Tweaks * Add TS to installation * Tweaks * New readme * Write new readme * Tweak * Center header * Bun * tweaks * No dollar sign * Fix links * Update * Tweak
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>;
}