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