文件网址路径
¥File URL paths
对于大多数 node:fs 模块函数,path 或 filename 参数可以作为使用 file: 协议的 <URL> 对象传入。
¥For most node:fs module functions, the path or filename argument may be
passed as a <URL> object using the file: protocol.
import { readFileSync } from 'node:fs';
readFileSync(new URL('file:///tmp/hello')); file: URL 始终是绝对路径。
¥file: URLs are always absolute paths.