[**minigame-std**](../../../README.md)

***

[minigame-std](../../../README.md) / [fs](../README.md) / exists

# Function: exists()

```ts
function exists(path): AsyncIOResult<boolean>
```

检查指定路径的文件或目录是否存在。

## Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `path` | `string` | 文件或目录的路径。 |

## Returns

`AsyncIOResult`\<`boolean`\>

存在返回 true 的异步操作结果。

## Defined in

[src/std/fs/fs\_async.ts:187](https://github.com/JiangJie/minigame-std/blob/8633d80114dee6c79033ec094d8233bd8263bedc/src/std/fs/fs_async.ts#L187)
