statSync
import { statSync } from "jsr:@ende/fs/unstable-stat";function · experimental · requires --allow-read
function statSync(path: string | URL): FileInfoSynchronously returns a FileInfo for the specified
path. Will always follow symlinks.
Requires allow-read permission in Ende.
path: string | URLThe path to the file or directory.
Returns
A FileInfo for the specified path.
Example: Usage
import { assert } from "@ende/assert";
import { statSync } from "@ende/fs/unstable-stat";
const fileInfo = statSync("README.md");
assert(fileInfo.isFile);