Clean output directory

@param {Function} done
763711
function cleanOutputDir(done) {
			var htmlDemoFileMask = path.join(o.destCss, o.fontBaseName + '*.{css,html}');
			var files = glob.sync(htmlDemoFileMask).concat(wf.generatedFontFiles(o));
			async.forEach(files, function(file, next) {
				fs.unlink(file, next);
			}, done);
		}
308986
function done(err, files) {
    // On processing errors notify the watcher (if listening) that square is idle.
    if (err && self.writable) {
      self.logger.error(err);
      return fn(err);
    }

    // Stop our cache, it will be activated again when we need it
    self.cache.stop();

    // Merge the results array to a key=>value object
    files = (files || []).reduce(function reduceFiles(memo, collection) {
      memo[collection.basename] = collection;
      return memo;
    }, {});

    // Building is done, call callback if available.
    self.logger.info('Successfully generated %s', Object.keys(files).join(', ').green);
    if (err && !args.function) self.critical(err);
    if (args.function) args.function.call(self, err, files, extensions);
  }
1264205
function cleanup() {
      res.removeListener('finish', sendStats);
      res.removeListener('error', cleanup);
      res.removeListener('close', cleanup);
    }
392390
protected function cleanUp()
    {
        $files = glob(__DIR__.DIRECTORY_SEPARATOR.'Mapping'.DIRECTORY_SEPARATOR.'{DataType,Property,Type}'.DIRECTORY_SEPARATOR.'*.php', GLOB_BRACE);
        foreach ($files as $file) {
            unlink($file);
        }
    }
1178418
function cleanDistDir(dir) {
  /* istanbul ignore else */
  if (dir !== process.cwd()) {
    fs.stat(dir, (err) => {
      if (!err) {
        del.sync([dir]);
      }

      fs.mkdirSync(dir);
    });
  }
}
252671
public function cleanup() {
    $this->say("Removing deprecated files and directories...");
    $this->taskFilesystemStack()
      ->remove([
        "build",
        "docroot/sites/default/settings/apcu_fix.yml",
        "docroot/sites/default/settings/base.settings.php",
        "docroot/sites/default/settings/blt.settings.php",
        "docroot/sites/default/settings/cache.settings.php",
        "docroot/sites/default/settings/filesystem.settings.php",
        "docroot/sites/default/settings/logging.settings.php",
        "docroot/sites/default/settings/travis.settings.php",
        "docroot/sites/default/settings/pipelines.settings.php",
        "docroot/sites/default/settings/tugboat.settings.php",
        "docroot/sites/settings/global.settings.default.php",
        "tests/phpunit/blt",
        "tests/phpunit/Bolt",
        "scripts/blt",
        "scripts/drupal",
        "scripts/drupal-vm",
        "scripts/git-hooks",
        "scripts/release-notes",
        "scripts/tugboat",
        "blt.sh",
        "project.yml",
        "project.local.yml",
        "example.project.local.yml",
        "readme/acsf-setup.md",
        "readme/architecture.md",
        "readme/best-practices.md",
        "readme/deploy.md",
        "readme/dev-workflow.md",
        "readme/features-workflow.md",
        "readme/local-development.md",
        "readme/onboarding.md",
        "readme/project-tasks.md",
        "readme/release-process.md",
        "readme/repo-architecture.md",
        "readme/views.md",
        "drush/policy.drush.inc",
      ])
      ->setVerbosityThreshold(VerbosityThresholdInterface::VERBOSITY_VERBOSE)
      ->run();
  }
592042
protected function cleanup()
    {
        // if $this->fs is an object, the Filesystem has been used, clean it up.
        if (is_object($this->fs)) {
            if ($this->fs->isDirectory($this->tempPath)) {
                $this->fs->deleteDirectory($this->tempPath, false);
            }
        }
    }
765922
function createOutputDirs(done) {
			o.stylesheets.forEach(function(stylesheet) {
				mkdirp.sync(option(o.destCssPaths, stylesheet));
			});
			mkdirp.sync(o.dest);
			done();
		}
697050
def clean(ctx):
    

    clean_command = f"make clean"
    with ctx.cd(ctx.docs.directory.as_posix()):
        report.info(ctx, "docs.clean", "cleaning documentation artifacts")
        ctx.run(clean_command)
1133508
function cleanupUpdates() {
        Object.keys(_idsToUpdate).forEach(function (id) {
            var installResult = _idsToUpdate[id],
                keepFile = installResult.keepFile,
                filename = installResult.localPath;

            if (filename && !keepFile) {
                FileSystem.getFileForPath(filename).unlink();
            }
        });
        _idsToUpdate = {};
    }
1219791
def cleanup(self):
        

        all([delete_file_or_tree(f) for f in self.to_delete])
        self.to_delete = []
889539
function(file, done){
      process.nextTick(function () {
        terra.render(file, function(error, body){
          if(error){
            done(error);
          }else{
            if(body){
              var dest = path.resolve(outputPath, ssr.helpers.outputPath(file));
              fs.mkdirp(path.dirname(dest), function(err){
                fs.writeFile(dest, body, done);
              });
            }else{
              done();
            }
          }
        });
      });
    }
839347
function cleanup() {
      res.removeListener('finish', makePoint);
      res.removeListener('error', cleanup);
      res.removeListener('close', cleanup);
    }
742767
def clear_dir(self):
        """"""
        for snapshot in output_utils.get_filenames(self.output_dir):
            if snapshot.endswith('.pkl'):
                os.remove(snapshot)
1036687
function createDirectories(done) {
		debug('createDirectories()');
		var paths = [ options.output ];
		function iterator(dirpath, next) { mkdirp(dirpath, '0755', next); };
		async.forEach(paths, iterator, done);
	}
365599
function clean(directoryPath, isRoot, done) {
  fs.stat(directoryPath, function(err, stat) {
    if (err) return done(isRoot ? undefined : err);
    if (stat.isFile()) return fs.unlink(directoryPath, done);
    fs.readdir(directoryPath, function(err, relativePaths) {
      if (err) return done(err);
      each(relativePaths, function(relativePath, next) {
        var absolutePath = path.join(directoryPath, relativePath);
        fs.stat(absolutePath, function(err, stats) {
          if (err) return next(err);
          if (!stats.isDirectory()) return fs.unlink(absolutePath, next);
          clean(absolutePath, false, next);
        });
      }, function(err) {
        if (err) return done(err);
        fs.rmdir(directoryPath, done);
      });
    });
  });
}
463028
function done() {
  	var storage = config.storage;

  	ProcessingQueue.finished = true;

  	var runtime = now() - config.started;
  	var passed = config.stats.all - config.stats.bad;

  	emit("runEnd", globalSuite.end(true));
  	runLoggingCallbacks("done", {
  		passed: passed,
  		failed: config.stats.bad,
  		total: config.stats.all,
  		runtime: runtime
  	});

  	// Clear own storage items if all tests passed
  	if (storage && config.stats.bad === 0) {
  		for (var i = storage.length - 1; i >= 0; i--) {
  			var key = storage.key(i);

  			if (key.indexOf("qunit-test-") === 0) {
  				storage.removeItem(key);
  			}
  		}
  	}
  }