readDirSync
function readDirSync(path): Iterable<DirEntry>;
Sync version of readDir.
Parameters
| Parameter | Type | Description |
|---|---|---|
|
| Directory path to read. |
Returns
Iterator.
Throws
Throws TypeError if the path is invalid. Or throws Error if failed to read the directory.
Example
for (const entry of Rsvim.fs.readDirSync(".")) {
Rsvim.cmd.echo(entry.name);
}