code: function fileStat(path) {
      return new Promise(function (resolve, reject) {
          fs.stat(path, function (err, stats) {
              if ((null !== err) && (undefined !== err)) {
                  reject(err);
              }
              else {
                  resolve(stats);
              }
          });
      });
  }
docs: TODO: share these, or try fs-promise (or similar)