mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
file.exists() needs to be awaited to get the value (#5061)
This commit is contained in:
@@ -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;
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user