Deno.stat
🌙
手机阅读
本文目录结构
stat
-
stat(path: string): Promise<FileInfo>
-
解析给定
path
,返回Deno.FileInfo
。如果path
为符号链接,则返回符号链接指向的文件。Resolves to a
Deno.FileInfo
for the specifiedpath
. Will always follow symlinks.const fileInfo = await Deno.stat("hello.txt"); assert(fileInfo.isFile);
需要
allow-read
权限。Requires
allow-read
permission.参数
-
path: string
返回 Promise<FileInfo>
-