(filePath)
| 9 | var logger = require('../util/logging').get('module'); |
| 10 | |
| 11 | var exists = function (filePath) { |
| 12 | return new Promise(function (resolve, reject) { |
| 13 | fs.exists(filePath, function (pathExists) { |
| 14 | if (pathExists) { |
| 15 | return resolve(pathExists); |
| 16 | } |
| 17 | |
| 18 | return reject({ |
| 19 | code: 'ENOENT', |
| 20 | filename: filePath |
| 21 | }); |
| 22 | }); |
| 23 | }); |
| 24 | }; |
| 25 | |
| 26 | /** |
| 27 | * A module for a game has several properties: |