blob: 202be61eb032bda04ce8e766377cc0af835708aa (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
---
name: Convert an absolute path to a file URL
---
Use `Bun.pathToFileURL()` to convert an absolute path to a `file://` URL.
```ts
Bun.pathToFileURL("/path/to/file.txt");
// => "file:///path/to/file.txt"
```
---
See [Docs > API > Utils](/docs/api/utils) for more useful utilities.
|