Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

fs.readfilesync withFileTypes true

_(fs.readdirSync(baseDir, {withFileTypes: true}))
  .filter(dirent => dirent.isDirectory())
  .map(dirent => dirent.name)
  .concat('.')
  .map(directory => path.resolve(baseDir, directory, '.platform.app.yaml'))
  .filter(file => fs.existsSync(file))
  .map(file => ({data: yamlPlatform.load(fs.readFileSync(file)), file}))
  .map(data => ({name: data.data.name, file: data.file, dir: path.dirname(data.file)}))
  .value()
Source by www.tabnine.com #
 
PREVIOUS NEXT
Tagged: #withFileTypes #true
ADD COMMENT
Topic
Name
9+1 =