Deno.readlinksync
readLinkSync
-
readLinkSync(path: string): string
-
同步方式解析并返回符号链接对目标文件的绝对路径。
Returns the full path destination of the named symbolic link.
Deno.symlinkSync("./test.txt", "./test_link.txt"); const target = Deno.readLinkSync("./test_link.txt"); // ./test.txt 的绝对路径
如果使用硬链接调用,则会抛出
TypeError
。Throws TypeError if called with a hard link
需要
allow-read
权限。Requires
allow-read
permission.
参数
- ##### path: string