Guides · Utilities
Convert a file URL to an absolute path
Convert a file:// URL into an absolute filesystem path with Bun.fileURLToPath().
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.