From 878b473085f9db2425bb45f0c76dbdf5bb3b4b85 Mon Sep 17 00:00:00 2001 From: amt8u <59372411+amt8u@users.noreply.github.com> Date: Wed, 13 Sep 2023 14:11:18 +0530 Subject: [PATCH] file.exists() needs to be awaited to get the value (#5061) --- docs/guides/read-file/exists.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guides/read-file/exists.md b/docs/guides/read-file/exists.md index fd6cbbf9a4..0359f57286 100644 --- a/docs/guides/read-file/exists.md +++ b/docs/guides/read-file/exists.md @@ -8,7 +8,7 @@ The `Bun.file()` function accepts a path and returns a `BunFile` instance. Use t const path = "/path/to/package.json"; const file = Bun.file(path); -file.exists(); // boolean; +await file.exists(); // boolean; ``` ---