How to use the wrench.readdirSyncRecursive function in wrench

To help you get started, we’ve selected a few wrench examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github webhook / webhook-generate / libs / generator.js View on Github external
removeDirectory('.tmp', function() {
      var files = wrench.readdirSyncRecursive('static');

      files.forEach(function(file) {
        var filePath = 'static/' + file;
        var distPath = '.whdist/static/' + file;
        if(!fs.lstatSync(filePath).isDirectory() && !fs.existsSync(distPath)) {
          var fileData = fs.readFileSync(filePath);
          fs.writeFileSync(distPath, fileData);
        }
      });

      done();
    });
  }
github theNewDynamic / thenewdynamic.org / libs / generator.js View on Github external
removeDirectory('.tmp', function() {
      var files = wrench.readdirSyncRecursive('static');

      files.forEach(function(file) {
        var filePath = 'static/' + file;
        var distPath = '.whdist/static/' + file;
        if(!fs.lstatSync(filePath).isDirectory() && !fs.existsSync(distPath)) {
          var fileData = fs.readFileSync(filePath);
          fs.writeFileSync(distPath, fileData);
        }
      });

      done();
    });
  }
github apache / cordova-blackberry / blackberry10 / bin / templates / project / cordova / lib / utils.js View on Github external
listFiles: function (directory, filter) {
        var files = wrench.readdirSyncRecursive(directory),
            filteredFiles = [];

        files.forEach(function (file) {
            //On mac wrench.readdirSyncRecursive does not return absolute paths, so resolve one.
            file = path.resolve(directory, file);

            if (filter(file)) {
                filteredFiles.push(file);
            }
        });

        return filteredFiles;
    },
github apache / cordova-blackberry / bin / templates / project / cordova / lib / packager-utils.js View on Github external
listFiles: function (directory, filter) {
        var files = wrench.readdirSyncRecursive(directory),
            filteredFiles = [];

        files.forEach(function (file) {
            //On mac wrench.readdirSyncRecursive does not return absolute paths, so resolve one.
            file = path.resolve(directory, file);

            if (filter(file)) {
                filteredFiles.push(file);
            }
        });

        return filteredFiles;
    },
github apache / cordova-blackberry / bin / templates / project / cordova / lib / utils.js View on Github external
listFiles: function (directory, filter) {
        var files = wrench.readdirSyncRecursive(directory),
            filteredFiles = [];

        files.forEach(function (file) {
            //On mac wrench.readdirSyncRecursive does not return absolute paths, so resolve one.
            file = path.resolve(directory, file);

            if (filter(file)) {
                filteredFiles.push(file);
            }
        });

        return filteredFiles;
    },

wrench

Recursive filesystem (and other) operations that Node *should* have.

MIT
Latest version published 9 years ago

Package Health Score

53 / 100
Full package analysis