bun-types
Version:
Type definitions and documentation for Bun, an incredibly fast JavaScript runtime
17 lines (12 loc) • 336 B
text/mdx
title: Convert a file URL to an absolute path
sidebarTitle: File URL to path
mode: center
Use `Bun.fileURLToPath()` to convert a `file://` URL to an absolute path.
```ts
Bun.fileURLToPath("file:///path/to/file.txt");
// => "/path/to/file.txt"
```
See [Docs > API > Utils](/docs/runtime/utils) for more useful utilities.