Use Bun.fileURLToPath() to convert a file:// URL to an absolute path.
Bun.fileURLToPath("file:///path/to/file.txt");
// => "/path/to/file.txt"
See Utils.
Runtime docs · Guides · Utilities
Use Bun.fileURLToPath() to convert a file:// URL to an absolute path.
Bun.fileURLToPath("file:///path/to/file.txt");
// => "/path/to/file.txt"
See Utils.