📅  最后修改于: 2022-03-11 15:04:12.788000             🧑  作者: Mango
const { readdirSync } = require('fs')
const getDirectories = source =>
readdirSync(source, { withFileTypes: true })
.filter(dirent => dirent.isDirectory())
.map(dirent => dirent.name)