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: 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(-) (limited to 'docs/guides') diff --git a/docs/guides/read-file/exists.md b/docs/guides/read-file/exists.md index fd6cbbf9a..0359f5728 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; ``` --- -- cgit v1.2.3