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

  1. var fs = require('fs')
  2. var input = __dirname + '/../src/redis'
  3. var loaded = {}
  4. var promises = fs.readdirSync(input).map(function (file) {
  5. return new Promise(function (resolve, reject) {
  6. fs.readFile(input + '/' + file, function (err, data) {
  7. if (err != null) {
  8. return reject(err)
  9. }
  10. loaded[file] = data.toString('utf8')
  11. return resolve()
  12. })
  13. })
  14. })
  15. Promise.all(promises)
  16. .then(function () {
  17. console.log(JSON.stringify(loaded, Object.keys(loaded).sort(), 2))
  18. })
  19. .catch(function (err) {
  20. console.error(err)
  21. process.exit(1)
  22. })