Delete DB folder
774666
public function deleteThemeDb($theme)
	{
		if($theme != null) {
			$model = OmmuThemes::model()->findByAttributes(array('folder'=>$theme));
			
			if($model != null)
				$model->delete();
			else 
				return false;

		} else 
			return false;
	}
840051
def delete_collection(db_name, collection_name, host='localhost', port=27017):
    """"""
    client = MongoClient("mongodb://%s:%d" % (host, port))
    client[db_name].drop_collection(collection_name)
474403
static function cleanup()
    {
        $db = eZDB::instance();
        $db->begin();
        $db->query( "DELETE FROM ezcollab_item" );
        $db->query( "DELETE FROM ezcollab_item_group_link" );
        $db->query( "DELETE FROM ezcollab_item_message_link" );
        $db->query( "DELETE FROM ezcollab_item_participant_link" );
        $db->query( "DELETE FROM ezcollab_item_status" );
        $db->query( "DELETE FROM ezcollab_notification_rule" );
        $db->query( "DELETE FROM ezcollab_profile" );
        $db->query( "DELETE FROM ezcollab_simple_message" );
        $db->commit();
    }
778760
def delete(self):
        """"""
        self._ensure_filename()
        self._close_if_open()
        os.remove(self.filename)
39874
def purge(self):
        '''
        
        '''
        for table_name in self._db.list_tables():
            self._db.flush(table_name)

        self._run_init_queries()
162595
def delete(bs)
      # Deallocate data chain.
      bs.wipeChain(self.firstCluster) if self.firstCluster != 0
      # Deallocate dir entry.
      if @lfn_ents then @lfn_ents.each {|ent| ent['seq_num'] = AF_DELETED} end
      @dir_ent['name'][0] = AF_DELETED
      @dirty = true
      self.writeEntry(bs)
    end
650017
def cleanup(test_data, udfs, tmp_data, tmp_db):
    """"""
    con = make_ibis_client(ENV)

    if udfs:
        # this comes before test_data bc the latter clobbers this too
        con.hdfs.rmdir(os.path.join(ENV.test_data_dir, 'udf'))

    if test_data:
        con.drop_database(ENV.test_data_db, force=True)
        con.hdfs.rmdir(ENV.test_data_dir)

    if tmp_data:
        con.hdfs.rmdir(ENV.tmp_dir)

    if tmp_db:
        con.drop_database(ENV.tmp_db, force=True)
1369718
function delete()
    {
        $path = $this->filePath;
        eZDebugSetting::writeDebug( 'kernel-clustering', "fs::delete( '$path' )", __METHOD__ );

        eZDebug::accumulatorStart( 'dbfile', false, 'dbfile' );

        if ( is_file( $path ) )
        {
            $handler = eZFileHandler::instance( false );
            $handler->unlink( $path );
            if ( file_exists( $path ) )
                eZDebug::writeError( "File still exists after removal: '$path'", __METHOD__ );
        }
        elseif ( is_dir( $path ) )
        {
            eZDir::recursiveDelete( $path );
        }

        eZClusterFileHandler::cleanupEmptyDirectories( $path );

        $this->loadMetaData( true );

        eZDebug::accumulatorStop( 'dbfile' );
    }
450783
public function deleteAll()
    {
        $schema = $this->getConn()->getSchemaManager();
        foreach ($schema->databaseList() as $dbName) {
            if ($this->isDBTemp($dbName)) {
                $schema->dropDatabase($dbName);
                $schema->alterationMessage("Dropped database \"$dbName\"", 'deleted');
                flush();
            }
        }
    }
98724
def delete(self, drop_database=True):
        
        self.disable()
        Session.delete(self)

        if drop_database and self.db_name:
            mysql = create_engine('mysql://root:secret@localhost')
            mysql.execute('DROP DATABASE IF EXISTS `{db}`'.format(db=self.db_name))
            try:
                mysql.execute('DROP USER `{u}`'.format(u=self.db_user))
            except SQLAlchemyError:
                pass
1051575
private void wipe(String dbfile) {
    File file = new File(dbfile);
    File dir = file.getParentFile();
    if (dir == null)
      return; // means directory doesn't exist. make error message elsewhere
    for (File f : dir.listFiles())
      if (f.getName().startsWith(file.getName()))
        f.delete();
  }
831676
def delete_archive_dir(self):
        
        logger.debug("Deleting: " + self.archive_dir)
        shutil.rmtree(self.archive_dir, True)
852675
def delete_gallery_folder(self, folder_name, scope='content/write'):
        
        return _delete(
            token=self.oauth.get_user_token(scope),
            uri='/user/media/' + urllib.quote(folder_name)
        )
22543
def delete(self):
        ''
        #url = '%s?dlDir=true' % self.path
        params = {'dlDir':'true'}
        r = self.jfs.post(self.path, params)
        self.sync()
        return r
281518
public function deleteContent()
  {
    $files = glob($this->folderPath . '*');
    foreach ($files as $file) {
      if (is_file($file)) {
        unlink($file);
      }
    }
  }
548746
def delete(build_folder):
    
    if _meta_.del_build in ["on", "ON"] and os.path.exists(build_folder):
        shutil.rmtree(build_folder)
1280354
def reset(yes):
    
    ok = yes or confirm('Do you really want to destroy all your data? (y/n) ')
    if not ok:
        return

    dbpath = os.path.realpath(os.path.expanduser(config.dbserver.file))

    # user must be able to access and write the databse file to remove it
    if os.path.isfile(dbpath) and os.access(dbpath, os.W_OK):
        if dbserver.get_status() == 'running':
            if config.dbserver.multi_user:
                sys.exit('The oq dbserver must be stopped '
                         'before proceeding')
            else:
                pid = logs.dbcmd('getpid')
                os.kill(pid, signal.SIGTERM)
                time.sleep(.5)  # give time to stop
                assert dbserver.get_status() == 'not-running'
                print('dbserver stopped')
        try:
            os.remove(dbpath)
            print('Removed %s' % dbpath)
        except OSError as exc:
            print(exc, file=sys.stderr)

    # fast way of removing everything
    purge_all(fast=True)