stat
function stat(path): Promise<FileInfo>;
Get the status of a file by path.
note
This api follows symbolic link.
Parameters
| Parameter | Type | Description |
|---|---|---|
|
| File path. |
Returns
It resolves to the file status.
See
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");