---
title: isFileProtocol
subpath: pota/use/url
topic: Routing
desc: True when an href starts with file://.
---

# isFileProtocol

`isFileProtocol(href)` returns `true` when `href` starts with
`file://`. Part of [`pota/use/url`](/use/url).

## Arguments

| Argument | Type     | Description       |
| -------- | -------- | ----------------- |
| `href`   | `string` | The URL to check. |

**Returns:** `boolean` — `true` when `href` starts with `file://`.
