docs: function traverseDirectory(directory, callback, done, limit) {
      var attemptDone, pending;
      var depth, limit;
  
      limit = limit || 10;
      depth = 0;
  
      // Start with one directory pending (e.g. data/).
      pending = 1;
  
      attemptDone = function(filePath, stat) {
          if (!filePath) {
              done();
          }
          else {
              callback(filePath, stat);
              if (--pending <= 0) done();
          }
      };
  
      function recurse(directory, depth) {
          if (depth >= limit) {
              attemptDone();
              return;
          }
          fs.readdir(directory, function(err, files) {
              // TODO: if directory does not exist, an
              // error will be thrown.
              files.forEach(function(file) {
                  var filePath;
                  // Ignore hidden files/dirs.
                  if (file.charAt(0) === '.') return;
                  filePath = path.join(directory, file);
                  // Every file must be processed.
                  pending++;
                  fs.stat(filePath, function(err, stat) {
                      // Recurse.
                      if (stat && stat.isDirectory()) {
                          recurse(filePath, depth + 1);
                      }
                      else {
                          attemptDone(filePath, stat);
                      }
                  });
              });
              // Directory scanned (was a file in previous scan).
              pending--;
          });
      }
  
      recurse(directory, depth);
  }