Sha256: dd80b76c5f633485d3a361cce29b45835b3887851ec9f35eedadcc23afe627b2

Contents?: true

Size: 845 Bytes

Versions: 86

Compression:

Stored size: 845 Bytes

Contents

var fs = require('../');
var rimraf = require('rimraf');
var mkdirp = require('mkdirp');
var test = require('tap').test;
var p = require('path').resolve(__dirname, 'files');

// Make sure to reserve the stderr fd
process.stderr.write('');

var num = 4097;
var paths = new Array(num);

test('make files', function (t) {
  rimraf.sync(p);
  mkdirp.sync(p);

  for (var i = 0; i < num; ++i) {
    paths[i] = 'files/file-' + i;
    fs.writeFileSync(paths[i], 'content');
  }

  t.end();
})

test('read files', function (t) {
  // now read them
  var done = 0;
  for (var i = 0; i < num; ++i) {
    fs.readFile(paths[i], function(err, data) {
      if (err)
        throw err;

      ++done;
      if (done === num) {
        t.pass('success');
        t.end()
      }
    });
  }
});

test('cleanup', function (t) {
  rimraf.sync(p);
  t.end();
});

Version data entries

86 entries across 79 versions & 3 rubygems

Version Path
hooch-0.4.2 jasmine/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/fs-extra/node_modules/graceful-fs/test/write-then-read.js
hooch-0.4.1 jasmine/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/fs-extra/node_modules/graceful-fs/test/write-then-read.js
hooch-0.4.0 jasmine/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/fs-extra/node_modules/graceful-fs/test/write-then-read.js
hooch-0.3.0 jasmine/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/fs-extra/node_modules/graceful-fs/test/write-then-read.js
hooch-0.2.1 jasmine/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/fs-extra/node_modules/graceful-fs/test/write-then-read.js
hooch-0.2.0 jasmine/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/fs-extra/node_modules/graceful-fs/test/write-then-read.js
hooch-0.1.0 jasmine/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/fs-extra/node_modules/graceful-fs/test/write-then-read.js
hooch-0.0.8 jasmine/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/fs-extra/node_modules/graceful-fs/test/write-then-read.js
hooch-0.0.7 jasmine/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/fs-extra/node_modules/graceful-fs/test/write-then-read.js
hooch-0.0.6 jasmine/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/fs-extra/node_modules/graceful-fs/test/write-then-read.js
smock-0.1.268 node_modules/webpack/node_modules/watchpack/node_modules/graceful-fs/test/write-then-read.js
smock-0.1.267 node_modules/webpack/node_modules/watchpack/node_modules/graceful-fs/test/write-then-read.js
smock-0.1.266 node_modules/webpack/node_modules/watchpack/node_modules/graceful-fs/test/write-then-read.js
smock-0.1.265 node_modules/webpack/node_modules/watchpack/node_modules/graceful-fs/test/write-then-read.js
smock-0.1.264 node_modules/webpack/node_modules/watchpack/node_modules/graceful-fs/test/write-then-read.js
smock-0.1.263 node_modules/webpack/node_modules/watchpack/node_modules/graceful-fs/test/write-then-read.js
smock-0.1.262 node_modules/webpack/node_modules/watchpack/node_modules/graceful-fs/test/write-then-read.js
smock-0.1.261 node_modules/webpack/node_modules/watchpack/node_modules/graceful-fs/test/write-then-read.js
smock-0.1.260 node_modules/webpack/node_modules/watchpack/node_modules/graceful-fs/test/write-then-read.js
smock-0.1.259 node_modules/webpack/node_modules/watchpack/node_modules/graceful-fs/test/write-then-read.js