Skip to main content
method Deno.FsFile.prototype.statSync

Synchronously returns a Deno.FileInfo for the file.

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

const file = Deno.openSync("hello.txt")
const fileInfo = file.statSync();
assert(fileInfo.isFile);
file.close();