# fileExists

Check whether a path exists.

```js
fileExists(path)
```

## Arguments

| Argument | Type | Meaning |
| --- | --- | --- |
| `path` | string | File or directory path. |

## Returns

Boolean.

## Example

```js
console.log(fileExists(__dirname + "/config.json"));
```

## Notes

Native file helpers do not resolve relative paths like require(); use __dirname or scriptsDir().

[All JavaScript APIs](https://mcp.applesauceos.com/doc/api.md) · [Automation playbook](https://mcp.applesauceos.com/doc/ai.md)
