Deno.realpathsync
🌙
手机阅读
本文目录结构
realpathSync
-
realpathSync(path: string): string
-
返回被解析后的符号链接绝对路径。
Returns absolute normalized path, with symbolic links resolved.
// e.g. given /home/alice/file.txt and current directory /home/alice Deno.symlinkSync("file.txt", "symlink_file.txt"); const realPath = Deno.realpathSync("./file.txt"); const realSymLinkPath = Deno.realpathSync("./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