> For the complete documentation index, see [llms.txt](https://sevenval.gitbook.io/flat/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sevenval.gitbook.io/flat/reference/functions/file-exists.md).

# file-exists()

```
boolean file-exists(string path)
```

The `file-exists` function accepts exactly one argument that is converted to a string. The argument must be a `fit://`-URL, otherwise an empty result is returned and an error will be raised.

The function returns `true` if the URL references an existing file or directory, `false` otherwise.

## Examples

* `file-exists('fit://site/path/to/file')`
* `file-exists('fit://site/path/to/directory/')`
* `file-exists('fit://request/content')`
