blob: 23a3947f06c0dffb4abc052d755eb1624c2991ef (
plain)
1
2
3
4
5
6
7
8
9
|
import * as fs from "fs";
export function readDir(path: string): Array<string> {
if (fs.existsSync(path)) {
return fs.readdirSync(path);
} else {
throw `Path "${path}" doesn't exist`;
}
}
|