lstat
import { lstat } from "jsr:@ende/fs/unstable-lstat";function · experimental · requires --allow-read
async function lstat(path: string | URL): Promise<FileInfo>Resolves to a FileInfo for the specified path. If path is a symlink, information for the symlink will be returned instead of what it points to.
Requires allow-read permission in Ende.
path: string | URLThe path to the file or directory.
Returns
A promise that resolves to a FileInfo for the specified path.
Example: Usage
import { assert } from "@ende/assert";
import { lstat } from "@ende/fs/unstable-lstat";
const fileInfo = await lstat("README.md");
assert(fileInfo.isFile);