mirror of
https://github.com/ChomeNS/chomens-bot-mc.git
synced 2024-11-27 17:45:34 -05:00
13 lines
258 B
JavaScript
13 lines
258 B
JavaScript
const fs = require('fs/promises')
|
|
|
|
async function list (filepath = '.') {
|
|
const files = await fs.readdir(filepath)
|
|
|
|
const component = []
|
|
files.forEach((filename, index) => {
|
|
component.push(filename)
|
|
})
|
|
return component
|
|
}
|
|
|
|
module.exports = list
|