Delete the current project without deleting the files in the directory.
187597
def delete_project(self):
        
        if self.current_active_project:
            self.switch_to_plugin()
            path = self.current_active_project.root_path
            buttons = QMessageBox.Yes | QMessageBox.No
            answer = QMessageBox.warning(
                self,
                _("Delete"),
                _("Do you really want to delete <b>{filename}</b>?<br><br>"
                  "<b>Note:</b> This action will only delete the project. "
                  "Its files are going to be preserved on disk."
                  ).format(filename=osp.basename(path)),
                buttons)
            if answer == QMessageBox.Yes:
                try:
                    self.close_project()
                    shutil.rmtree(osp.join(path, '.spyproject'))
                except EnvironmentError as error:
                    QMessageBox.critical(
                        self,
                        _("Project Explorer"),
                        _("<b>Unable to delete <i>{varpath}</i></b>"
                          "<br><br>The error message was:<br>{error}"
                          ).format(varpath=path, error=to_text_string(error)))
963472
private void cleanupProjectIfEmpty() {

        m_requiresCleanup = false;
        try {
            CmsObject cms = OpenCms.initCmsObject(m_adminCms);
            cms.readProject(getProject().getUuid());
        } catch (CmsException e) {
            return;
        }
        try {
            CmsObject cms = OpenCms.initCmsObject(m_adminCms);
            cms.getRequestContext().setCurrentProject(getProject());
            CmsUUID projectId = getProject().getUuid();
            List<CmsResource> projectResources = cms.readProjectView(projectId, CmsResource.STATE_KEEP);
            if (projectResources.isEmpty()) {
                cms.deleteProject(projectId);
            }
        } catch (CmsException e) {
            LOG.error(e.getLocalizedMessage(), e);
        }
    }
548746
def delete(build_folder):
    
    if _meta_.del_build in ["on", "ON"] and os.path.exists(build_folder):
        shutil.rmtree(build_folder)
30075
def remove(self, experiment):
        """"""
        try:
            project_path = self.projects[self[experiment]['project']]['root']
        except KeyError:
            return
        config_path = osp.join(project_path, '.project', experiment + '.yml')
        for f in [config_path, config_path + '~', config_path + '.lck']:
            if os.path.exists(f):
                os.remove(f)
        del self[experiment]
915674
void deleteProjectDirsIfNecessary(final long newProjectSizeInBytes) {
    final long projectCacheMaxSizeInByte =
        (long) (this.projectCacheDir.getTotalSpace() * this.percentageOfDisk);

    final long start = System.currentTimeMillis();
    final List<ProjectDirectoryMetadata> allProjects = loadAllProjects();
    log.info("Loading {} project dirs metadata completed in {} sec(s)",
        allProjects.size(), (System.currentTimeMillis() - start) / 1000);

    final long currentSpaceInBytes = getProjectDirsTotalSizeInBytes(allProjects);
    if (currentSpaceInBytes + newProjectSizeInBytes >= projectCacheMaxSizeInByte) {
      log.info(
          "Project cache usage[{} MB] >= cache limit[{} MB], start cleaning up project dirs",
          (currentSpaceInBytes + newProjectSizeInBytes) / (1024 * 1024),
          projectCacheMaxSizeInByte / (1024 * 1024));

      final long freeCacheSpaceInBytes = projectCacheMaxSizeInByte - currentSpaceInBytes;

      deleteLeastRecentlyUsedProjects(newProjectSizeInBytes - freeCacheSpaceInBytes, allProjects);
    }
  }
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)
415867
protected function cleanup(): void
    {
        $this->output->writeln('');
        $this->output->write('Cleaning up... ');
        $this->output->writeln('');
        $this->output->writeln('');

        $projectDir = $this->getContainer()->getParameter('kernel.project_dir');

        try {
            $fileSystem = $this->getContainer()->get('filesystem');

            if (
                $fileSystem->exists($projectDir . '/.git') &&
                $this->questionHelper->ask(
                    $this->input,
                    $this->output,
                    $this->getConfirmationQuestion(
                        'Do you want to delete the <comment>.git</comment> folder?',
                        true
                    )
                )
            ) {
                $fileSystem->remove($projectDir . '/.git');
            }
        } catch (Exception $e) {
            // Do nothing
        }
    }
1017809
def clean():
        
        shutil.rmtree(BUILD_PATH, ignore_errors=True)
        shutil.rmtree(os.path.join(SOURCE_PATH, 'reference', 'api'),
                      ignore_errors=True)
318412
def delete_project(self, project):
        
        pid = project.pid

        # project deleted

        ds_project = self.get_project(pid)
        if ds_project is not None:
            self._delete_project(pid)

        return
1238406
public static void recursivelyDeleteDir(File customProfileDir) {
		if (customProfileDir == null || !customProfileDir.exists()) {
			return;
		}
		Delete delete = new Delete();
		delete.setProject(new Project());
		delete.setDir(customProfileDir);
		delete.setFailOnError(true);
		delete.execute();
	}
360618
def cleanup():
        """"""
        for install_dir in linters.INSTALL_DIRS:
            try:
                shutil.rmtree(install_dir, ignore_errors=True)
            except Exception:
                print(
                    "{0}\nFailed to delete {1}".format(
                        traceback.format_exc(), install_dir
                    )
                )
                sys.stdout.flush()
182661
def _cleanup(path: str) -> None:
    """"""
    if os.path.isdir(path):
        shutil.rmtree(path)
1071492
def delete_tmp_dir(self):
        
        logger.debug("Deleting: " + self.tmp_dir)
        shutil.rmtree(self.tmp_dir, True)
846575
def delete_files(self, selections) -> None:
        """"""
        try:
            currentpath = self.currentpath
            for selection in selections:
                name = str(selection)
                if name == 'complete':
                    continue
                if not name.endswith('.py'):
                    name += '.py'
                path = os.path.join(currentpath, name)
                os.remove(path)
        except BaseException:
            objecttools.augment_excmessage(
                f'While trying to remove the network files of '
                f'selections `{selections}`')
703103
def clear(self):
        '''
        
        '''
        if os.path.exists(self.path):
            os.remove(self.path)
1289093
def clean(cls, path):
        ''''''
        for pth in os.listdir(path):
            pth = os.path.abspath(os.path.join(path, pth))
            if os.path.isdir(pth):
                logger.debug('Removing directory %s' % pth)
                shutil.rmtree(pth)
            else:
                logger.debug('Removing file %s' % pth)
                os.remove(pth)
1243184
def delete_project(self, project):
        
        pid = project.pid

        # project deleted

        ds_project = self.get_project(pid)
        if ds_project is not None:
            self._call(["delete", "account", "name=%s" % pid])

        return