---
title: "isfile"
description: "Checks whether a workspace path exists as a file."
---

```lua
isfile(path: string): boolean
```

---

## Aliases

None.

---

## Arguments

<ParamField body="path" type="string" required>
  A UTF-8 path relative to the Byte workspace.
</ParamField>

---

## Returns

<ResponseField name="result" type="boolean">
  Whether the queried condition holds.
</ResponseField>

Missing paths return false; invalid or outside-workspace paths raise an error.

**Related types:** [Filesystem types & behavior](/reference/filesystem/types).

---

## Example

```lua
print(isfile("docs-example/read.txt"))
```
