Empty all relevant files from the build directory.

@param  {string} buildPath
@param  {string} manifest
969756
function(buildPath, manifest) {
    fs.stat(manifest, function(err, stat) {
        if (! err) {
            manifest = JSON.parse(fs.readFileSync(manifest));

            for (var key in manifest) {
                del.sync(buildPath + '/' + manifest[key], { force: true });
            }
        }
    });
}
936807
function resolveAppBuild(appTsConfigPath) {
  const outDir = getAppBuildFolder(appTsConfigPath);
  const buildPath = path.join(path.dirname(appTsConfigPath), outDir);
  return buildPath;
}
155869
function() {
                var asset;
                Microloader.updatedAssetsReady = true;

                if (Microloader.updatedManifest) {
                    while (Microloader.removedAssets.length > 0) {
                        asset = Microloader.removedAssets.pop();
                        //<debug>
                            _debug("Asset: " + asset.assetConfig.path + " was removed, un-caching");
                        //</debug>
                        asset.uncache();
                    }

                    if (Microloader.updatedManifest) {
                        //<debug>
                        _debug("Manifest was updated, re-caching");
                        //</debug>
                        Microloader.updatedManifest.cache();
                    }

                    while (Microloader.updatedAssets.length > 0) {
                        asset = Microloader.updatedAssets.pop();
                        //<debug>
                            _debug("Asset: " + asset.assetConfig.path + " was updated, re-caching");
                        //</debug>
                        asset.cache();
                    }

                }

                Microloader.notifyUpdateReady();
            }
624028
public function emptyCompileDir()
    {
        $this->console("Deleting compiled assets");
        $dir = $this->compilePath() . $this->prefix();
        if (is_dir($dir)) {
            Rails\Toolbox\FileTools::emptyDir($dir);
        }
    }
1221333
def clean_all(self, args):
        """"""
        self.clean_dists(args)
        self.clean_builds(args)
        self.clean_download_cache(args)
532843
public static void remove(String filePath) {
        File file = new File(filePath);
        if (file.exists() && file.isFile()) {
            file.delete();
        }
    }
529625
async function filterFiles(files) {
    const clearModule = replace(/^\.\//, '');
    const resources = files | filter(test(/^((icon\.png)|(README(\.\w+)?\.md))$/));
    const missing = without(files, requiredFiles);

    if (missing.length > 0) {
        return reject(Error(`missing ${missing.join(', ')} from the project`));
    }

    if (!contains('icon.png', files)) {
        emitWarning('compiling app without providing an icon.png file');
    }

    const infoFiles = await listFiles('info')
        | filter(test(/[a-z]{2}(_[A-Z]{2,3})?\.md/))
        | map(path.join('info/', _));

    return fs.readFileAsync('index.js', 'utf-8')
        .then(inspect)
        .then(over(lensProp('modules'), filter(startsWith('./'))))
        .then(({ code, modules }) => ({
            code,
            files: union(modules.map(clearModule),
                [...resources, ...requiredFiles, ...infoFiles])
        }));
}
800162
function(targetPath, callback) {
            client
                .deleteFile(targetPath)
                .then(function() {
                    __executeCallbackAsync(callback, [null]);
                })
                .catch(callback);
        }
978401
function cleanPath(cleanPath) {
    const removePath = path.resolve(process.cwd(), cleanPath)
    rimraf(removePath, () => {
        console.log(removePath, "cleaned");
    });
}
485688
function normalizeManifest(manifest, fn) {
  var obj = {};
  manifest.forEach(function(file) {
    if (!file) return;
    obj[file.name] = {
      mtime: file.mtime,
      mode: file.mode,
      size: file.size,
      hash: file.hash,
      link: file.link
    };
  });
  fn(null, obj);
}
495504
function getBuildPath(rootPath, buildPath) {
    let result = buildPath || './build';

    if (!path.isAbsolute(result)) {
        result = path.resolve(rootPath, result);
    }

    return result;
}
236046
static void deletePath(String path) {
        try {
            ZkConnection.client.delete().guaranteed().deletingChildrenIfNeeded().forPath(path);
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
354677
function ignore(dir, options) {
  var jpmignore = path.join(dir, ".jpmignore");
  var defaultRules = ["*.zip", ".*", "test/", ".jpmignore", "*.xpi"];

  return utils.getManifest({addonDir: options.addonDir})
    .then(function(manifest) {
      return fs.exists(jpmignore);
    })
    .then(function(exists) {
      if (exists) {
        if (options.verbose) {
          console.log(".jpmignore found");
        }
        return fs.stat(jpmignore)
          .then(function(stat) {
            if (stat.isFile()) {
              return fs.readFile(jpmignore)
                .then(function(data) {
                  return data.toString().replace(/[\r\n]/, "\n").split("\n");
                });
            } else {
              console.warn(
                ".jpmignore is not a file, fallback to use " +
                  "default filter rules");
              return defaultRules;
            }
          });
      } else {
        if (options.verbose) {
          console.warn(
            ".jpmignore does not exist, fallback to use default filter rules");
        }
        return defaultRules;
      }
    })
    .then(function(lines) {
      // Add "manifest.json" to always exclude it from the xpi (See
      // https://github.com/mozilla-jetpack/jpm/pull/566 for rationale),
      // but ensure the "webextension/manifest.json", that is used for the
      // webextension embedded in an SDK hybrid add-on, is always included
      // (See https://github.com/mozilla-jetpack/jpm/pull/578 for rationale).
      lines = ["manifest.json", "!webextension/manifest.json"].concat(lines);

      var rules = lines.filter(function(e) {
        // exclude blank lines and comments
        return !/^\s*(#|$)/.test(e);
      });
      // http://git-scm.com/docs/gitignore
      // the last matching pattern decides the outcome
      // reverse rules and break at first matched rule when filtering
      return rules.reverse().map(function(rule) {
        return new Minimatch(rule, {
          matchBase: true,
          dot: true,
          flipNegate: true
        });
      });
    })
    .then(function(rules) {
      return listdir(dir, rules, dir, true);
    });
}
1008227
def clear(self, autoBuild=True):
        
        for action in self._actionGroup.actions():
            self._actionGroup.removeAction(action)
        
        action = QAction('', self)
        action.setObjectName('place_holder')
        self._actionGroup.addAction(action)
        if autoBuild:
            self.rebuild()
997316
def delete_package(path, packages):
    
    if _meta_.del_all in ["on", "ON"]:
        for pkg in packages:
            os.remove(path + pkg)
726012
function emptyDirectory(path, callback) {
  fs.readdir('./' + path, function(err, files) {
    if (err && 'ENOENT' !== err.code) throw new Error(err);
    callback(!files || !files.length);
  });
}
762921
static void deleteOldBuildDataDirs(File tmpDir, Log logger) {
        if (!tmpDir.exists()) {
            // Before creation of the @tmp directory
            return;
        }
        File[] buildDataDirs = tmpDir.listFiles(buildDataDir -> {
            long ageInMilliseconds = new Date().getTime() - buildDataDir.lastModified();
            return ageInMilliseconds > TimeUnit.DAYS.toMillis(1);
        });
        if (buildDataDirs == null) {
            logger.error("Failed while attempting to delete old build data dirs. Could not list files in " + tmpDir);
            return;
        }

        for (File buildDataDir : buildDataDirs) {
            try {
                FileUtils.deleteDirectory(buildDataDir);
                logger.debug(buildDataDir.getAbsolutePath() + " deleted");
            } catch (IOException e) {
                logger.error("Failed while attempting to delete old build data dir: " + buildDataDir.toString(), e);
            }
        }
    }