2018-03-22 05:53:25 +01:00
|
|
|
const { lstatSync, readdirSync } = require('fs');
|
|
|
|
const { join } = require('path');
|
|
|
|
|
|
|
|
export const getSubDirectoryNames = (root) => {
|
|
|
|
return readdirSync(root)
|
|
|
|
.filter(name => {
|
2018-03-22 06:06:35 +01:00
|
|
|
const fullPath = join(root, name);
|
2018-03-22 05:53:25 +01:00
|
|
|
return lstatSync(fullPath).isDirectory();
|
|
|
|
});
|
|
|
|
};
|