本页还没有译文
还没翻译·译自英文(bun.com)·本页 3 段都还没译
Use Bun.pathToFileURL() to convert an absolute path to a file:// URL.
Bun.pathToFileURL()
file://
Bun.pathToFileURL("/path/to/file.txt").href; // => "file:///path/to/file.txt"
See Utils.