Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/deno/cli/dts/lib.deno.ns.d.ts>Deno.FsFile#stat

A modern runtime for JavaScript and TypeScript.
Go to Latest
method Deno.FsFile.prototype.stat
import { Deno } from "https://deno.land/x/deno@v1.28.0/cli/dts/lib.deno.ns.d.ts";
const { FsFile } = Deno;

Resolves to a Deno.FileInfo for the file.

import { assert } from "https://deno.land/std/testing/asserts.ts";

const file = await Deno.open("hello.txt");
const fileInfo = await file.stat();
assert(fileInfo.isFile);
file.close();