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

Synchronously returns a Deno.FileInfo for the file.

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

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