code: async function getFileList(dir, exclude, options) {
    options = options || {};
    //If it gets a folder instead of a pattern, take all files in folder
    if (!glob.hasMagic(dir)) {
      if (await exports.isDirectory(dir)) {
        dir = path.join(dir, "**/*");
      }
    }
    if (exclude && !Array.isArray(exclude) && !glob.hasMagic(exclude)) {
      if (await exports.isDirectory(exclude)) {
        exclude = path.join(exclude, "**/*");
      }
    } else if (exclude) {
      for (var excludeIndex = 0; excludeIndex < exclude.length; excludeIndex++) {
        if (!glob.hasMagic(exclude[excludeIndex])) {
          exclude[excludeIndex] = path.join(exclude[excludeIndex], "**/*");
        }
      }
    }
    if (options.includeFolders) {
      result = await promisifyGlob(dir, {
        ignore: exclude
      });
    } else {
      result = await promisifyGlob(dir, {
        ignore: exclude,
        nodir: true
      });
    }
    var clean = [];
    for (const res of result) {
      var relative = await relativePath(dir, res);
      clean.push(relative);
    }
    return clean;
  }
docs: /*
  @function (private) getFileList [Get files recursively from directory] {string[]}
  @param dir {string} [Directory to search]
  @param exclude {string[]} [string[] of patterns to exclude from search]
  @param options [includeFolders: Boolean to include folders as paths, default false]