Clean up the temporary jar file
171077
@Override
    public void cleanUpTempCatalogJar() {
        File configInfoDir = getConfigDirectory();
        if (!configInfoDir.exists()) {
            return;
        }

        File tempJar = new VoltFile(configInfoDir.getPath(),
                                    InMemoryJarfile.TMP_CATALOG_JAR_FILENAME);
        if(tempJar.exists()) {
            tempJar.delete();
        }
    }
663288
def cleanup_environment():
    
    SERV.terminate()
    shutil.rmtree(TMP_PATH)
    if os.path.exists(TMP_PATH):
        os.rmdir(TMP_PATH)

    global TMP_PATH
    TMP_PATH = None
572860
def clean_tmpdir(path):
    """"""
    if os.path.exists(path) and \
       os.path.isdir(path):
        rmtree(path)
124213
def cleanup_all_temporary_files(self):
        # type: (Descriptor) -> None
        
        # delete local file
        try:
            self.final_path.unlink()
        except OSError:
            pass
        # iterate unchecked chunks and delete
        for key in self._unchecked_chunks:
            ucc = self._unchecked_chunks[key]['ucc']
            if ucc.temp:
                try:
                    ucc.file_path.unlink()
                except OSError:
                    pass
1301707
function cleanupTempFiles (options) {
  return new Promise((resolve, reject) => {
    if (options.tempDir) {
      if (path.dirname(options.sourceMap) === options.tempDir) {
        fs.unlinkSync(options.sourceMap)
      }
      fs.rmdir(options.tempDir, (err) => {
        if (err) {
          reject(err)
        } else {
          resolve()
        };
      })
    } else {
      resolve()
    }
  })
}
1221333
def clean_all(self, args):
        """"""
        self.clean_dists(args)
        self.clean_builds(args)
        self.clean_download_cache(args)
1090803
def cleanup(self):
        """"""
        shutil.rmtree(self.name, onerror=lambda *a: os.chmod(a[1], __import__('stat').S_IWRITE) or os.unlink(a[1]))
        if os.path.exists(self.name):
            raise IOError(17, "File exists: '{}'".format(self.name))
1124994
public static void clearTempFiles() {
		String userFolderPath = getUserFolderPath(false);
		File file = new File(userFolderPath);
		deleteDir(file);
	}
205300
private void cleanup() {
    if (operation instanceof Command && log.isOpen()) {
      try {
        log.release(index);
      } catch (IllegalStateException e) {
      }
    }

    session.release();

    index = 0;
    session = null;
    instant = null;
    operation = null;

    pool.release(this);
  }
337291
def _clean_file(self, f):
        ''''''
        if os.path.exists(f) and not os.path.islink(f):
            tmp_file = tempfile.TemporaryFile(mode='w+b')
            try:
                fh = open(f, 'r')
                data = fh.readlines()
                fh.close()
                if len(data) > 0: #if the file isn't empty:
                    for l in data:
                        new_l = self._clean_line(l)
                        tmp_file.write(new_l.encode('utf-8'))

                    tmp_file.seek(0)

            except Exception as e: # pragma: no cover
                self.logger.exception(e)
                raise Exception("CleanFile Error: Cannot Open File For Reading - %s" % f)

            try:
                if len(data) > 0:
                    new_fh = open(f, 'wb')
                    for line in tmp_file:
                        new_fh.write(line)
                    new_fh.close()
            except Exception as e: # pragma: no cover
                self.logger.exception(e)
                raise Exception("CleanFile Error: Cannot Write to New File - %s" % f)

            finally:
                tmp_file.close()
92523
def clean():
    ""
    src_dir = easy.options.setdefault("docs", {}).get('src_dir', None)
    if src_dir is None:
        src_dir = 'src' if easy.path('src').exists() else '.'

    with easy.pushd(src_dir):
        for pkg in set(easy.options.setup.packages) | set(("tests",)):
            for filename in glob.glob(pkg.replace('.', os.sep) + "/*.py[oc~]"):
                easy.path(filename).remove()
638209
public void cleanup() {
		long currentTime = System.currentTimeMillis();

		// remove entries which have exceeded their time to live
		cachedExecutionGraphs.values().removeIf(
			(ExecutionGraphEntry entry) -> currentTime >= entry.getTTL());
	}
443861
protected function cleanup()
    {
        $this->filesystem->remove($this->tmpFolder);
        $this->root = null;
        $this->urlsets = array();
    }
1303605
def _cleanup(self, domains):
        """"""
        for option in domains.values():
            try:
                os.remove(option['pot'])
            except (IOError, OSError):
                # It is not a problem if we can't actually remove the temporary file
                pass
69453
def clean(self):
        
        if self._initialized:
            logger.info("brace yourselves, removing %r", self.path)
            shutil.rmtree(self.path)
601351
def clean():
    """"""
    shutil.rmtree('{PROJECT_NAME}.egg-info'.format(PROJECT_NAME=PROJECT_NAME), ignore_errors=True)
    shutil.rmtree('build', ignore_errors=True)
    shutil.rmtree('dist', ignore_errors=True)
    shutil.rmtree('htmlcov', ignore_errors=True)
    shutil.rmtree('__pycache__', ignore_errors=True)
1369016
def cleanTempDirs(job):
    """"""
    if job is CWLJob and job._succeeded:  # Only CWLJobs have this attribute.
        for tempDir in job.openTempDirs:
            if os.path.exists(tempDir):
                shutil.rmtree(tempDir)
        job.openTempDirs = []