Skip to main content
Version: Next

stat

function stat(path): Promise<FileInfo>;

Get the status of a file by path.

note

This api follows symbolic link.

Parameters​

ParameterTypeDescription

path

string

File path.

Returns​

Promise<FileInfo>

It resolves to the file status.

See​

RsvimFs.lstat

Throws​

Throws TypeError if the file name is invalid. Or throws Error if failed to get file status.

Example​

const fstat = await Rsvim.fs.stat("README.md");