Simple email application for Android. Original source code: https://framagit.org/dystopia-project/simple-email
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

25 lines
571 B

var fs = require('fs')
var input = __dirname + '/../src/redis'
var loaded = {}
var promises = fs.readdirSync(input).map(function (file) {
return new Promise(function (resolve, reject) {
fs.readFile(input + '/' + file, function (err, data) {
if (err != null) {
return reject(err)
}
loaded[file] = data.toString('utf8')
return resolve()
})
})
})
Promise.all(promises)
.then(function () {
console.log(JSON.stringify(loaded, Object.keys(loaded).sort(), 2))
})
.catch(function (err) {
console.error(err)
process.exit(1)
})