Methods
(static) batches(path) → {Array}
A function to read the contents of a directory and to extract all files with the file extension *.json
.
Parameters:
Name | Type | Description |
---|---|---|
path | String | A given path as string. |
Returns:
Returns all JSON files contained in path
.
- Type:
- Array
(static) isDir(path) → {Boolean}
A function to check whether a path is a directory. This is a wrapper function for fs.lstatSync(path).isDirectory()
.
Parameters:
Name | Type | Description |
---|---|---|
path | String | A given path as string. |
Returns:
- Type:
- Boolean
(static) path(dir) → {String}
A function to check whether an absolute or relative path exists.
Parameters:
Name | Type | Description |
---|---|---|
dir | String | A given path as string. |
Returns:
Returns the path in case it exists. Returns null
otherwise.
- Type:
- String