Deno.lstat

\color{red}{function} Deno.lstat(path: string | URL) : Promise<FileInfo>

\color{red}{作用}

解析为指定路径的Deno.FileInfo。
如果path是一个符号链接,则将返回该符号链接的信息,而不是其指向的内容。

Resolves to a Deno.FileInfo for the specified path.
If path is a symlink, information for the symlink will be returned instead of what it points to.

\color{red}{参数}

path: string | URL

path: string | URL

\color{red}{返回值}

Promise<FileInfo>

Promise<FileInfo>

\color{red}{示列代码}

import { assert } from "https://deno.land/std/testing/asserts.ts";
const fileInfo = await Deno.lstat("hello.txt");
assert(fileInfo.isFile);

\color{red}{其它}

需要提供 allow-read 权限。

Requires allow-read permission.

原文地址:点此跳转

Deno 目录

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容