Deno.stat
statSync
-
statSync(path: string): FileInfo
-
同步方式解析给定
path
,返回Deno.FileInfo
。 如果path
为符号链接,则返回符号链接指向的文件。Synchronously returns a
Deno.FileInfo
for the specifiedpath
. Will always follow symlinks.const fileInfo = Deno.statSync("hello.txt"); assert(fileInfo.isFile);
需要
allow-read
权限。Requires
allow-read
permission.
参数
- ##### path: string