How to use the opendir function from fs-extra

Find comprehensive JavaScript fs-extra.opendir code examples handpicked from public code repositorys.

2
3
4
5
6
7
8
9
10
11
12


const walk = async (root, visit) => new Promise((resolve, reject) => {
  let outstanding = 1;
  
  async function process(dir) {
    const listing = await fse.opendir(dir);
    
    const subdirs = [], others = [];
    for await (const entry of listing) {
      if (entry.isDirectory()) {
fork icon0
star icon0
watch icon0

54
55
56
57
58
59
60
61
62
63
64


async function buildVersionsPage({ wt, version }) {
  // have to do this inside an async function
  const { compareSemVer, isValidSemVer } = await import('semver-parser');
  
  const dir = await fsx.opendir(wt.dir, {encoding: 'utf8'});
  const availableVersions = [];
  for await (const dirent of dir) {
    if (
      dirent.isDirectory() && isValidSemVer(dirent.name) &&
fork icon0
star icon0
watch icon0

function icon

fs-extra.readFileSync is the most popular function in fs-extra (9724 examples)