code: function stat (reqPath) {
      return new Promise(function (resolve, reject) {
        fs.stat(path.join(ramlPath, reqPath), function (err, stat) {
          if (err) {
            if (err.code === 'ENOENT') {
              return reject(err.code);
            }
            return reject(err); // generate 500
          }
  
          if (stat.isDirectory()) {
            return resolve(listDirectory(reqPath));
          }
  
          if (stat.isFile()) {
            return resolve({
              path: url.resolve('/', reqPath),
              name: path.basename(reqPath),
              type: 'file'
            });
          }
        });
      });
    }
docs: stat returns a Promise resolving in either a listDirectory() call
  or to the basename of reqPath passed
  @param  {string} reqPath: file path relative to ramlPath
  @return {Promise} resolving in an object containing folder (see listDirectory) or a string of the basename