worker = async (filename) => {
      let stats
      try {
        stats = await fs.stat(path.join(dir, filename))
      } catch {
        return
      }
      const entry = { name: filename, stats }
      if (stats.isDirectory()) {
        if (options.extendedFolderInfo) {
          entry.extendedInfo = await dirList.getExtendedInfo(path.join(dir, filename))
        }
        entries.dirs.push(entry)
      } else {
        entries.files.push(entry)
      }
    }
get files and dirs from dir, or error
@param {string} dir full path fs dir
@param {(boolean | ListOptionsJsonFormat | ListOptionsHtmlFormat)} options
@param {string} dotfiles
note: can't use glob because don't get error on non existing dir