Deletes all the job files
488285
public function clean()
    {
        $jobFiles = glob($this->getLocation() . '*.js');
        foreach ($jobFiles as $file) {
            unlink($file);
        }
    }
572458
private void cleanup(JobID jobId) {
		if (!lru.contains(jobId)) {
			lru.addFirst(jobId);
		}
		if (lru.size() > this.maxEntries) {
			JobID toRemove = lru.removeLast();
			this.jobAccumulators.remove(toRemove);
		}
	}
50621
public function dirRemove()
    {
        $paths = $this->getPaths();
        $filesystem = $this->getFilesystem();
        $this->info('Removing artifact directories');
        $filesystem->remove([
            $paths['coverage'],
            $paths['reports']
        ]);
        $this->info('Artifact directories removed');
    }
1068309
public function cleanup()
    {
        $this->listeners = [];
        $this->results = [];
        $this->jobs = [];
        $this->more = null;
    }
885607
def cleanup(dest, tardir, counterfile):
    """"""
    thefiles = Queue()
    # dest directory files
    queue_files(dest, thefiles)
    # tar directory files
    queue_files(tardir, thefiles)
    while not thefiles.empty():
        d_file = thefiles.get()
        info("Deleting file: %s" % d_file)
        os.unlink(d_file)
    if os.path.exists(counterfile):
        info("Deleting the counter file %s" % counterfile)
        os.unlink(counterfile)
1205086
public function deleteAll()
    {
        foreach (scandir($this->directory) as $file) {
            if (!in_array($file, ['.', '..', 'keep'])) {
                unlink($this->directory . '/' . $file);
            }
        }
    }
51765
public void cancelAllJobs(){
        Iterator<CacheManagerTask> iterator = mPendingTasks.iterator();
        while (iterator.hasNext()) {
            CacheManagerTask next = iterator.next();
            next.cancel(true);
        }
        mPendingTasks.clear();
    }
296301
def cleanup(self):
        """"""
        for file in glob.glob(self.basename + '*'):
            os.unlink(file)
378178
def clean_jobs(self, recursive=False):
        """"""
        self._interface.clean_jobs(self.scatter_link,
                                   clean_all=recursive)
437069
public function clearAll()
    {
        $path  = $this->getFilePath();
        $files = glob($path . '*' . $this->fileExtension);

        foreach ($files as $file)
        {
            @unlink($file);
        }

        static::$keys = [];
    }
801933
def delete(self):
        
        if self.jenkins_host.has_job(self.name):
            LOGGER.info("deleting {0}...".format(self.name))
            self.jenkins_host.delete_job(self.name)
1192979
def clear(self):
        
        for f in [x['content'] for x in self.metadata.values()]:
            os.remove(f)

        self.metadata = {}
        self._flush()
745258
public function actionDeleteAll()
    {
        Console::output('Do you want to delete all dumps? [yes|no]');
        $answer = trim(fgets(STDIN));
        if (!strncasecmp($answer, 'y', 1)) {
            if (!empty($this->getModule()->getFileList())) {
                $fail = [];
                foreach ($this->getModule()->getFileList() as $file) {
                    if (!unlink($file)) {
                        $fail[] = $file;
                    }
                }
                if (empty($fail)) {
                    Console::output('All dumps successfully removed.');
                } else {
                    Console::output('Error deleting dumps.');
                }
            }
        }
    }
53920
def remove_job_resolver(self, job_resolver):
        
        for i, r in enumerate(self.job_resolvers()):
            if job_resolver == r:
                del self._job_resolvers[i]
284995
def _clean(self):
        """"""
        if self._workers:
            for url in self._workers.copy():
                w = self._workers[url]
                if w.is_finished():
                    self._workers.pop(url)
                    self._paths.pop(url)
                    if url in self._get_requests:
                        self._get_requests.pop(url)

        else:
            self._timer.stop()
331005
def clean_old_jobs():
    '''
    
    '''
    if __opts__['keep_jobs'] != 0:
        jid_root = _job_dir()

        if not os.path.exists(jid_root):
            return

        # Keep track of any empty t_path dirs that need to be removed later
        dirs_to_remove = set()

        for top in os.listdir(jid_root):
            t_path = os.path.join(jid_root, top)

            if not os.path.exists(t_path):
                continue

            # Check if there are any stray/empty JID t_path dirs
            t_path_dirs = os.listdir(t_path)
            if not t_path_dirs and t_path not in dirs_to_remove:
                dirs_to_remove.add(t_path)
                continue

            for final in t_path_dirs:
                f_path = os.path.join(t_path, final)
                jid_file = os.path.join(f_path, 'jid')
                if not os.path.isfile(jid_file) and os.path.exists(f_path):
                    # No jid file means corrupted cache entry, scrub it
                    # by removing the entire f_path directory
                    shutil.rmtree(f_path)
                elif os.path.isfile(jid_file):
                    jid_ctime = os.stat(jid_file).st_ctime
                    hours_difference = (time.time() - jid_ctime) / 3600.0
                    if hours_difference > __opts__['keep_jobs'] and os.path.exists(t_path):
                        # Remove the entire f_path from the original JID dir
                        try:
                            shutil.rmtree(f_path)
                        except OSError as err:
                            log.error('Unable to remove %s: %s', f_path, err)

        # Remove empty JID dirs from job cache, if they're old enough.
        # JID dirs may be empty either from a previous cache-clean with the bug
        # Listed in #29286 still present, or the JID dir was only recently made
        # And the jid file hasn't been created yet.
        if dirs_to_remove:
            for t_path in dirs_to_remove:
                # Checking the time again prevents a possible race condition where
                # t_path JID dirs were created, but not yet populated by a jid file.
                t_path_ctime = os.stat(t_path).st_ctime
                hours_difference = (time.time() - t_path_ctime) / 3600.0
                if hours_difference > __opts__['keep_jobs']:
                    shutil.rmtree(t_path)
524958
protected function cleanUpAll()
    {
        if ( $this->Options['clean-all'] )
        {
            $this->CLI->output( "eZSearchEngine: Cleaning up search data for all installations" );
            $searchEngine = new eZSolr();
            // The essence of teh All suffix
            $allInstallations = true;
            // Optimize: sets all indexes to minimal file size too
            $optimize = true;
            $searchEngine->cleanup( $allInstallations, $optimize );
        }
    }