Deno.realpath
🌙
手机阅读
本文目录结构
realpath
-
realpath(path: string): Promise<string>
-
返回被解析后的符号链接绝对路径。
Resolves to the absolute normalized path, with symbolic links resolved.
// e.g. given /home/alice/file.txt and current directory /home/alice await Deno.symlink("file.txt", "symlink_file.txt"); const realPath = await Deno.realpath("./file.txt"); const realSymLinkPath = await Deno.realpath("./symlink_file.txt"); console.log(realPath); // outputs "/home/alice/file.txt" console.log(realSymLinkPath); //outputs "/home/alice/file.txt"
需要
allow-read
权限Requires
allow-read
permission.
参数
- ##### path: string