Delete this configuration

        :param directory_updated: If True, tell ConfigurationAdmin to not
                                  recall the directory of this deletion
                                  (internal use only)
516286
def delete(self, directory_updated=False):
        # pylint: disable=W0212
        
        with self.__lock:
            if self.__deleted:
                # Nothing to do
                return

            # Update status
            self.__deleted = True

            # Notify ConfigurationAdmin, notify services only if the
            # configuration had been updated before
            self.__config_admin._delete(self, self.__updated, directory_updated)

            # Remove the file
            self.__persistence.delete(self.__pid)

            # Clean up
            if self.__properties:
                self.__properties.clear()

            self.__persistence = None
            self.__pid = None
1113373
def remove_instance_dir!
      FileUtils.remove_entry(config.instance_dir, true) if File.exists? config.instance_dir
    end
601042
public static void removeDirectory(File dir) throws IOException
   {
      if (dir.isDirectory())
      {
         for (File subFile : dir.listFiles())
         {
            removeDirectory(subFile);
         }

         if (!dir.delete())
         {
            throw new IOException("Can't remove folder : " + dir.getCanonicalPath());
         }
      }
      else
      {
         if (!dir.delete())
         {
            throw new IOException("Can't remove file : " + dir.getCanonicalPath());
         }
      }
   }
1350421
private static void deleteDirectoryOnExit(File directory) throws IOException {
    if (!directory.exists()) {
      return;
    }

    directory.deleteOnExit();
    if (!isSymlink(directory)) {
      cleanDirectoryOnExit(directory);
    }
  }
1257801
def delete(self, delete_subdomains=False):
        
        self.manager.delete(self, delete_subdomains=delete_subdomains)
55496
public function clearTemporaryDirectory()
    {
        if ($sCompileDir = \OxidEsales\Eshop\Core\Registry::get(\OxidEsales\Eshop\Core\ConfigFile::class)->getVar('sCompileDir')) {
            CliExecutor::executeCommand("sudo chmod 777 -R $sCompileDir");
            $this->removeTemporaryDirectory($sCompileDir, false);
        }
    }
633562
def delete_archive_file(self):
        
        logger.debug("Deleting %s", self.archive_tmp_dir)
        shutil.rmtree(self.archive_tmp_dir, True)
1192354
def delete(self, key):
    '''
    '''
    super(DirectoryTreeDatastore, self).delete(key)

    str_key = str(key)

    # ignore root
    if str_key == '/':
      return

    # retrieve directory, to remove entry
    dir_key = key.parent.instance('directory')
    directory = self.directory(dir_key)

    # ensure key is not in directory
    if directory and str_key in directory:
      directory.remove(str_key)
      if len(directory) > 0:
        super(DirectoryTreeDatastore, self).put(dir_key, directory)
      else:
        super(DirectoryTreeDatastore, self).delete(dir_key)
1322440
public void removeStorageDir(StorageDir dir) {
    if (mDirs.remove(dir)) {
      mCapacityBytes -=  dir.getCapacityBytes();
    }
    mLostStorage.add(dir.getDirPath());
  }
171198
public function deleteSetupDirectory()
    {
        $blDeleteSetupDirectory = true;

        $sConfig = join("", file(getShopBasePath() . "config.inc.php"));
        if (strpos($sConfig, "this->blDelSetupDir = false;") !== false) {
            $blDeleteSetupDirectory = false;
        }

        return $blDeleteSetupDirectory;
    }
92533
def try_remove(self):
        
        if self.islink():
            self.unlink()
        elif self.isfile():
            self.remove()
        elif self.isdir():
            self.empty_directory()
            if self.isdir():
                self.rmdir()
        else:
            return False
        return True
909148
def delete_website(directory)
      if File.exists? yaml_file(directory, website.title)
        FileUtils.rm(yaml_file(directory, website.title)) 
      end
    end
956818
public static function deleteDirectoryContents($directory, $DELETE_DIRECTORY = false)
    {
        $files = array_diff(scandir($directory), ['.', '..']);

        foreach ($files as $file) {
            $path = self::getPath([$directory, $file]);
            (
                is_dir($path)
                ? self::deleteDirectoryContents($path, true)
                : unlink($path)
            );
        }

        return $DELETE_DIRECTORY ? rmdir($directory) : true;
    }
637343
def _delete_stale(self):
        
        for name, hash_ in self._stale_files.items():
            path = self.download_root.joinpath(name)
            if not path.exists():
                continue
            current_hash = self._path_hash(path)
            if current_hash == hash_:
                progress_logger.info('deleting: %s which is stale...', name)
                path.unlink()
                self._stale_deleted += 1
                while True:
                    path = path.parent
                    if path == self.download_root or list(path.iterdir()):
                        break
                    progress_logger.info('deleting: %s which is stale..', path.relative_to(self.download_root))
                    path.rmdir()
            else:
                progress_logger.error('Not deleting "%s" which is in the lock file but not the definition '
                                      'file, however appears to have been modified since it was downloaded. '
                                      'Please check and delete the file manually.', name)
                raise GrablibError('stale file modified')
798549
def _delete_dir(self):
        
        if not self.auto and os.path.isdir(self.meta.build_path + self.prgnam):
            shutil.rmtree(self.meta.build_path + self.prgnam)
853459
def directoryRemove(self, dir_key, key):
    '''
    '''
    key = str(key)

    dir_items = self.get(dir_key) or []
    if key in dir_items:
      dir_items = [k for k in dir_items if k != key]
      self.put(dir_key, dir_items)
653679
def teardown_tempdir(dir):
    
    '''

    if ssh_conn:
        delete_tree(dir)

    assert_valid_dir(dir)
    shutil.rmtree(dir)