readDirSync
readDirSync(path): null | string[]
Synchronously returns an array of the file names within path.
Parameters
| Parameter | Type |
|---|---|
path | PathLike |
Returns
null | string[]
Example
for (const file of Switch.readDirSync('sdmc:/')) {
// … do something with `file` …
}