Skip to main content

statSync

method Deno.FsFile.prototype.statSync
Jump to headingFsFile.prototype.statSync(): FileInfo

Synchronously returns a Deno.FileInfo for the file.

import { assert } from "jsr:@std/assert";

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

Return Type Jump to heading

Back to top