The path to convert.
Convert a filesystem path to a file:// URL.
A URL with the file:// scheme.
const url = Bun.pathToFileURL("/foo/bar.txt");
console.log(url.href); // "file:///foo/bar.txt"
Internally, this function uses WebKit's URL API to convert the path to a file:// URL.
The path to convert.
Generated using TypeDoc
Convert a filesystem path to a file:// URL.
Returns
A URL with the file:// scheme.
Example
Internally, this function uses WebKit's URL API to convert the path to a file:// URL.