Bun.pathToFileURL()
to convert an absolute path to a file://
URL.
See Docs > API > Utils for more useful utilities.
Bun.pathToFileURL()
to convert an absolute path to a file://
URL.
Bun.pathToFileURL('/path/to/file.txt');
// => "file:///path/to/file.txt"
Was this page helpful?